From 00b6ceaecda9157b7762450890a1236346b5d909 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 14 Feb 2021 20:09:44 +0800 Subject: [PATCH 001/126] Make Volo.Abp.EntityFrameworkCore.Oracle available. --- ...Volo.Abp.EntityFrameworkCore.Oracle.csproj | 2 +- ...extConfigurationContextOracleExtensions.cs | 59 ++++++++++-------- .../AbpDbContextOptionsOracleExtensions.cs | 60 +++++++++---------- .../AbpEntityFrameworkCoreOracleModule.cs | 42 +++++++------ nupkg/common.ps1 | 2 +- 5 files changed, 85 insertions(+), 80 deletions(-) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj index 7611559008..2cfa2fb199 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs index 2dd3139a82..31bde60b38 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs @@ -1,26 +1,33 @@ -// using JetBrains.Annotations; -// using Microsoft.EntityFrameworkCore; -// using System; -// using Oracle.EntityFrameworkCore.Infrastructure; -// using Volo.Abp.EntityFrameworkCore.DependencyInjection; -// -// namespace Volo.Abp.EntityFrameworkCore -// { -// public static class AbpDbContextConfigurationContextOracleExtensions -// { -// public static DbContextOptionsBuilder UseOracle( -// [NotNull] this AbpDbContextConfigurationContext context, -// [CanBeNull] Action oracleOptionsAction = null) -// { -// TODO: UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); -// if (context.ExistingConnection != null) -// { -// return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); -// } -// else -// { -// return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); -// } -// } -// } -// } +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore; +using System; +using Oracle.EntityFrameworkCore.Infrastructure; +using Volo.Abp.EntityFrameworkCore.DependencyInjection; + +namespace Volo.Abp.EntityFrameworkCore +{ + public static class AbpDbContextConfigurationContextOracleExtensions + { + public static DbContextOptionsBuilder UseOracle( + [NotNull] this AbpDbContextConfigurationContext context, + [CanBeNull] Action oracleOptionsAction = null) + { + if (context.ExistingConnection != null) + { + return context.DbContextOptions.UseOracle(context.ExistingConnection, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + oracleOptionsAction?.Invoke(optionsBuilder); + }); + } + else + { + return context.DbContextOptions.UseOracle(context.ConnectionString, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + oracleOptionsAction?.Invoke(optionsBuilder); + }); + } + } + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs index f5f9dc7f61..f4817d5ab4 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs @@ -1,30 +1,30 @@ -// using JetBrains.Annotations; -// using System; -// using Oracle.EntityFrameworkCore.Infrastructure; -// -// namespace Volo.Abp.EntityFrameworkCore -// { -// public static class AbpDbContextOptionsOracleExtensions -// { -// public static void UseOracle( -// [NotNull] this AbpDbContextOptions options, -// [CanBeNull] Action oracleOptionsAction = null) -// { -// options.Configure(context => -// { -// context.UseOracle(oracleOptionsAction); -// }); -// } -// -// public static void UseOracle( -// [NotNull] this AbpDbContextOptions options, -// [CanBeNull] Action oracleOptionsAction = null) -// where TDbContext : AbpDbContext -// { -// options.Configure(context => -// { -// context.UseOracle(oracleOptionsAction); -// }); -// } -// } -// } +using JetBrains.Annotations; +using System; +using Oracle.EntityFrameworkCore.Infrastructure; + +namespace Volo.Abp.EntityFrameworkCore +{ + public static class AbpDbContextOptionsOracleExtensions + { + public static void UseOracle( + [NotNull] this AbpDbContextOptions options, + [CanBeNull] Action oracleOptionsAction = null) + { + options.Configure(context => + { + context.UseOracle(oracleOptionsAction); + }); + } + + public static void UseOracle( + [NotNull] this AbpDbContextOptions options, + [CanBeNull] Action oracleOptionsAction = null) + where TDbContext : AbpDbContext + { + options.Configure(context => + { + context.UseOracle(oracleOptionsAction); + }); + } + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs index 21fad9375a..b7cbaec1a1 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs @@ -1,22 +1,20 @@ -// using Volo.Abp.Guids; -// using Volo.Abp.Modularity; -// -// namespace Volo.Abp.EntityFrameworkCore.Oracle -// { -// [DependsOn( -// typeof(AbpEntityFrameworkCoreModule) -// )] -// public class AbpEntityFrameworkCoreOracleModule : AbpModule -// { -// public override void ConfigureServices(ServiceConfigurationContext context) -// { -// Configure(options => -// { -// if (options.DefaultSequentialGuidType == null) -// { -// options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; -// } -// }); -// } -// } -// } +using Volo.Abp.Guids; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EntityFrameworkCore.Oracle +{ + [DependsOn(typeof(AbpEntityFrameworkCoreModule))] + public class AbpEntityFrameworkCoreOracleModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + if (options.DefaultSequentialGuidType == null) + { + options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; + } + }); + } + } +} diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 16f13513ee..8fcb74149a 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -86,7 +86,7 @@ $projects = ( "framework/src/Volo.Abp.Emailing", "framework/src/Volo.Abp.EntityFrameworkCore", "framework/src/Volo.Abp.EntityFrameworkCore.MySQL", - # "framework/src/Volo.Abp.EntityFrameworkCore.Oracle", + "framework/src/Volo.Abp.EntityFrameworkCore.Oracle", "framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart", "framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql", "framework/src/Volo.Abp.EntityFrameworkCore.Sqlite", From f7cc1138e15d7462a8416cfd1abf827f33437a57 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 14 Feb 2021 20:43:15 +0800 Subject: [PATCH 002/126] Upgrade NUglify to latest. Related: 7667 --- .../Volo.Abp.AspNetCore.Mvc.UI.csproj | 2 +- framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj index ad0066db55..a379c8057d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj b/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj index 6f25c447f0..45302cfab3 100644 --- a/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj +++ b/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj @@ -19,7 +19,7 @@ - + From bf920da8cebe11e444ea162515d8b88f2ca208c2 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 15 Feb 2021 09:51:29 +0800 Subject: [PATCH 003/126] Explicitly set email & password in the initial data seed of startup templates. --- .../Volo/Abp/Identity/IdentityDataSeedContributor.cs | 9 +++++++-- .../Data/MyProjectNameDbMigrationService.cs | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs index a5af0acf2c..82677d74e4 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs @@ -6,6 +6,11 @@ namespace Volo.Abp.Identity { public class IdentityDataSeedContributor : IDataSeedContributor, ITransientDependency { + public const string AdminEmailPropertyName = "AdminEmail"; + public const string AdminEmailDefaultValue = "admin@abp.io"; + public const string AdminPasswordPropertyName = "AdminPassword"; + public const string AdminPasswordDefaultValue = "1q2w3E*"; + protected IIdentityDataSeeder IdentityDataSeeder { get; } public IdentityDataSeedContributor(IIdentityDataSeeder identityDataSeeder) @@ -16,8 +21,8 @@ namespace Volo.Abp.Identity public virtual Task SeedAsync(DataSeedContext context) { return IdentityDataSeeder.SeedAsync( - context?["AdminEmail"] as string ?? "admin@abp.io", - context?["AdminPassword"] as string ?? "1q2w3E*", + context?[AdminEmailPropertyName] as string ?? AdminEmailDefaultValue, + context?[AdminPasswordPropertyName] as string ?? AdminPasswordDefaultValue, context?.TenantId ); } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs index f33076746a..4327e32b00 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs @@ -9,6 +9,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; +using Volo.Abp.Identity; using Volo.Abp.MultiTenancy; using Volo.Abp.TenantManagement; @@ -106,6 +107,11 @@ namespace MyCompanyName.MyProjectName.Data Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); await _dataSeeder.SeedAsync(tenant?.Id); + + await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id) + .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue) + .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue) + ); } private bool DbMigrationsProjectExists() From 1a884c72de0cda86db95c6902033a8d9a00ec1cc Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 15 Feb 2021 09:59:29 +0800 Subject: [PATCH 004/126] Update MyProjectNameDbMigrationService.cs --- .../Data/MyProjectNameDbMigrationService.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs index 4327e32b00..08d784f58d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs @@ -106,8 +106,6 @@ namespace MyCompanyName.MyProjectName.Data { Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); - await _dataSeeder.SeedAsync(tenant?.Id); - await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id) .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue) .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue) From efb37d57458223ed7830bf02341549c39202dc50 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 15 Feb 2021 16:22:39 +0800 Subject: [PATCH 005/126] Rename EmailSettingManagement to EmailSetting. --- .../SettingManagementPermissionDefinitionProvider.cs | 2 +- .../Abp/SettingManagement/SettingManagementPermissions.cs | 2 +- .../Volo/Abp/SettingManagement/EmailSettingsAppService.cs | 2 +- .../AbpSettingManagementBlazorModule.cs | 2 +- ...tPageContributor.cs => EmailSettingPageContributor.cs} | 6 +++--- .../Resources/AbpSettingManagement/de-DE.json | 4 ++-- .../Localization/Resources/AbpSettingManagement/en.json | 4 ++-- .../Localization/Resources/AbpSettingManagement/es.json | 4 ++-- .../Localization/Resources/AbpSettingManagement/tr.json | 4 ++-- .../Resources/AbpSettingManagement/zh-Hans.json | 4 ++-- .../AbpSettingManagementWebModule.cs | 2 +- ...tPageContributor.cs => EmailSettingPageContributor.cs} | 8 ++++---- 12 files changed, 22 insertions(+), 22 deletions(-) rename modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/{EmailSettingManagementPageContributor.cs => EmailSettingPageContributor.cs} (87%) rename modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/{EmailSettingManagementPageContributor.cs => EmailSettingPageContributor.cs} (85%) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs index 6c93975aa8..a7c7c7f983 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.SettingManagement public override void Define(IPermissionDefinitionContext context) { var moduleGroup = context.AddGroup(SettingManagementPermissions.GroupName, L("Permission:SettingManagement")); - moduleGroup.AddPermission(SettingManagementPermissions.EmailSettingManagement, L("Permission:EmailSettingManagement"), multiTenancySide: MultiTenancySides.Host); + moduleGroup.AddPermission(SettingManagementPermissions.EmailSetting, L("Permission:EmailSetting"), multiTenancySide: MultiTenancySides.Host); } private static LocalizableString L(string name) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissions.cs index 62d4448549..eb68845487 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissions.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissions.cs @@ -6,7 +6,7 @@ namespace Volo.Abp.SettingManagement { public const string GroupName = "SettingManagement"; - public const string EmailSettingManagement = GroupName + ".EmailSettingManagement"; + public const string EmailSetting = GroupName + ".EmailSetting"; public static string[] GetAll() { diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs index c1eb5fc304..ee5e4ec430 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs @@ -5,7 +5,7 @@ using Volo.Abp.Emailing; namespace Volo.Abp.SettingManagement { - [Authorize(SettingManagementPermissions.EmailSettingManagement)] + [Authorize(SettingManagementPermissions.EmailSetting)] public class EmailSettingsAppService : SettingManagementAppServiceBase, IEmailSettingsAppService { protected ISettingManager SettingManager { get; } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs index 14bd1bdd55..de17beec9e 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.SettingManagement.Blazor Configure(options => { - options.Contributors.Add(new EmailSettingManagementPageContributor()); + options.Contributors.Add(new EmailSettingPageContributor()); }); } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingManagementPageContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingPageContributor.cs similarity index 87% rename from modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingManagementPageContributor.cs rename to modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingPageContributor.cs index 8266618cef..b1f6e9d63a 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingManagementPageContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingPageContributor.cs @@ -7,7 +7,7 @@ using Volo.Abp.SettingManagement.Localization; namespace Volo.Abp.SettingManagement.Blazor.Settings { - public class EmailSettingManagementPageContributor: ISettingComponentContributor + public class EmailSettingPageContributor: ISettingComponentContributor { public async Task ConfigureAsync(SettingComponentCreationContext context) { @@ -20,7 +20,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Settings context.Groups.Add( new SettingComponentGroup( "Volo.Abp.SettingManagement", - l["Menu:EmailSettingManagement"], + l["Menu:EmailSetting"], typeof(EmailSettingGroupViewComponent) ) ); @@ -35,7 +35,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Settings { var authorizationService = context.ServiceProvider.GetRequiredService(); - return await authorizationService.IsGrantedAsync(SettingManagementPermissions.EmailSettingManagement); + return await authorizationService.IsGrantedAsync(SettingManagementPermissions.EmailSetting); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json index 78300d8530..ef0af78334 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json @@ -4,8 +4,8 @@ "Settings": "Einstellungen", "SuccessfullySaved": "Erfolgreich gespeichert", "Permission:SettingManagement": "Einstellungen-Verwaltung", - "Permission:EmailSettingManagement": "E-Mail-Einstellungen", - "Menu:EmailSettingManagement": "E-Mail-Verwaltung", + "Permission:EmailSetting": "E-Mail-Einstellungen", + "Menu:EmailSetting": "E-Mail-Einstellung", "SmtpHost": "Host", "SmtpPort": "Port", "SmtpUserName": "Benutzername", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json index 5cbee9f36c..37ce73fcb2 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json @@ -4,8 +4,8 @@ "Settings": "Settings", "SuccessfullySaved": "Successfully saved", "Permission:SettingManagement": "Setting Management", - "Permission:EmailSettingManagement": "Email Settings", - "Menu:EmailSettingManagement": "Email management", + "Permission:EmailSetting": "Email Setting", + "Menu:EmailSetting": "Email Setting", "SmtpHost": "Host", "SmtpPort": "Port", "SmtpUserName": "User name", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json index d2f833a686..7bd35306bb 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json @@ -4,8 +4,8 @@ "Settings": "Configuraciones", "SuccessfullySaved": "Guardado correctamente", "Permission:SettingManagement": "Configuraciones de correo electronico", - "Permission:EmailSettingManagement": "Administración Configuraciones", - "Menu:EmailSettingManagement": "Administración de correo electronico", + "Permission:EmailSetting": "Configuración de correo electrónico", + "Menu:EmailSetting": "Configuración de correo electrónico", "SmtpHost": "Host", "SmtpPort": "Puerto", "SmtpUserName": "Nombre de usuario", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json index de00a854c0..4710abde96 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json @@ -4,8 +4,8 @@ "Settings": "Ayarlar", "SuccessfullySaved": "Başarıyla Kaydedildi", "Permission:SettingManagement": "Ayarlar yönetimi", - "Permission:EmailSettingManagement": "Email Ayarlar", - "Menu:EmailSettingManagement": "Email yönetimi", + "Permission:EmailSetting": "Email Ayarlar", + "Menu:EmailSetting": "Email Ayarlar", "SmtpHost": "Sunucu", "SmtpPort": "Port", "SmtpUserName": "Kullanıcı adı", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json index 653ff051ee..5a2053700a 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json @@ -4,8 +4,8 @@ "Settings": "设置", "SuccessfullySaved": "保存成功", "Permission:SettingManagement": "设置管理", - "Permission:EmailSettingManagement": "邮件设置", - "Menu:EmailSettingManagement": "邮件管理", + "Permission:EmailSetting": "邮件设置", + "Menu:EmailSetting": "邮件设置", "SmtpHost": "主机", "SmtpPort": "端口", "SmtpUserName": "用户名", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs index 139b654030..84113041b8 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.SettingManagement.Web Configure(options => { - options.Contributors.Add(new EmailSettingManagementPageContributor()); + options.Contributors.Add(new EmailSettingPageContributor()); }); Configure(options => diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingManagementPageContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingPageContributor.cs similarity index 85% rename from modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingManagementPageContributor.cs rename to modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingPageContributor.cs index 8df3a2c76f..b7888a8eb2 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingManagementPageContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingPageContributor.cs @@ -8,7 +8,7 @@ using Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSet namespace Volo.Abp.SettingManagement.Web.Settings { - public class EmailSettingManagementPageContributor: ISettingPageContributor + public class EmailSettingPageContributor: ISettingPageContributor { public async Task ConfigureAsync(SettingPageCreationContext context) { @@ -20,8 +20,8 @@ namespace Volo.Abp.SettingManagement.Web.Settings var l = context.ServiceProvider.GetRequiredService>(); context.Groups.Add( new SettingPageGroup( - "Volo.Abp.SettingManagement", - l["Menu:EmailSettingManagement"], + "Volo.Abp.EmailSetting", + l["Menu:EmailSetting"], typeof(EmailSettingGroupViewComponent) ) ); @@ -36,7 +36,7 @@ namespace Volo.Abp.SettingManagement.Web.Settings { var authorizationService = context.ServiceProvider.GetRequiredService(); - return await authorizationService.IsGrantedAsync(SettingManagementPermissions.EmailSettingManagement); + return await authorizationService.IsGrantedAsync(SettingManagementPermissions.EmailSetting); } } } From c67896d1bb6fade69ce15d895a83616690e9a49f Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 15 Feb 2021 13:21:10 +0300 Subject: [PATCH 006/126] CmsKit - Remove updating BlogId while updating blog post --- ...ateBlogPostDto.cs => CreateBlogPostDto.cs} | 2 +- .../Admin/Blogs/IBlogPostAdminAppService.cs | 3 +- .../CmsKit/Admin/Blogs/UpdateBlogPostDto.cs | 24 +++++++++++++++ .../Admin/Blogs/BlogPostAdminAppService.cs | 7 +++-- ...CmsKitAdminApplicationAutoMapperProfile.cs | 3 +- .../Admin/Blogs/BlogPostAdminController.cs | 4 +-- .../Blogs/BlogPostAdminAppService_Tests.cs | 29 +++---------------- 7 files changed, 39 insertions(+), 33 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/{CreateUpdateBlogPostDto.cs => CreateBlogPostDto.cs} (94%) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/UpdateBlogPostDto.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateUpdateBlogPostDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateBlogPostDto.cs similarity index 94% rename from modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateUpdateBlogPostDto.cs rename to modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateBlogPostDto.cs index 4c0532129d..a8423a7300 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateUpdateBlogPostDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateBlogPostDto.cs @@ -5,7 +5,7 @@ using Volo.CmsKit.Blogs; namespace Volo.CmsKit.Admin.Blogs { - public class CreateUpdateBlogPostDto + public class CreateBlogPostDto { [Required] public Guid BlogId { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogPostAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogPostAdminAppService.cs index 28d614d289..aa110fe938 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogPostAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogPostAdminAppService.cs @@ -11,7 +11,8 @@ namespace Volo.CmsKit.Admin.Blogs BlogPostDto, Guid, PagedAndSortedResultRequestDto, - CreateUpdateBlogPostDto> + CreateBlogPostDto, + UpdateBlogPostDto> { Task GetBySlugAsync(string blogSlug, string slug); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/UpdateBlogPostDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/UpdateBlogPostDto.cs new file mode 100644 index 0000000000..909d8e2e9e --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/UpdateBlogPostDto.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; +using Volo.CmsKit.Blogs; + +namespace Volo.CmsKit.Admin.Blogs +{ + public class UpdateBlogPostDto + { + [Required] + [DynamicMaxLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxTitleLength))] + public string Title { get; set; } + + [Required] + [DynamicStringLength( + typeof(BlogPostConsts), + nameof(BlogPostConsts.MaxSlugLength), + nameof(BlogPostConsts.MinSlugLength))] + public string Slug { get; set; } + + [DynamicMaxLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxShortDescriptionLength))] + public string ShortDescription { get; set; } + + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs index 8fa6fb9ff7..d2c1114dfb 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs @@ -23,7 +23,8 @@ namespace Volo.CmsKit.Admin.Blogs BlogPostDto, Guid, PagedAndSortedResultRequestDto, - CreateUpdateBlogPostDto> + CreateBlogPostDto, + UpdateBlogPostDto> , IBlogPostAdminAppService { protected readonly IBlogPostManager BlogPostManager; @@ -63,7 +64,7 @@ namespace Volo.CmsKit.Admin.Blogs } [Authorize(CmsKitAdminPermissions.BlogPosts.Create)] - public override async Task CreateAsync(CreateUpdateBlogPostDto input) + public override async Task CreateAsync(CreateBlogPostDto input) { _ = await UserLookupService.GetByIdAsync(CurrentUser.GetId()); @@ -80,7 +81,7 @@ namespace Volo.CmsKit.Admin.Blogs } [Authorize(CmsKitAdminPermissions.BlogPosts.Update)] - public override async Task UpdateAsync(Guid id, CreateUpdateBlogPostDto input) + public override async Task UpdateAsync(Guid id, UpdateBlogPostDto input) { var blogPost = await BlogPostRepository.GetAsync(id); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 8fc2567093..4087c25ad1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -22,7 +22,8 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Source); CreateMap(MemberList.Destination); - CreateMap(MemberList.Source); + CreateMap(MemberList.Source); + CreateMap(MemberList.Source); CreateMap(MemberList.Destination) .ReverseMap(); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs index 6c7e78de50..92d23dff4d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs @@ -31,7 +31,7 @@ namespace Volo.CmsKit.Admin.Blogs [HttpPost] [Authorize(CmsKitAdminPermissions.BlogPosts.Create)] - public virtual Task CreateAsync(CreateUpdateBlogPostDto input) + public virtual Task CreateAsync(CreateBlogPostDto input) { return BlogPostAdminAppService.CreateAsync(input); } @@ -107,7 +107,7 @@ namespace Volo.CmsKit.Admin.Blogs [HttpPut] [Route("{id}")] [Authorize(CmsKitAdminPermissions.BlogPosts.Update)] - public virtual Task UpdateAsync(Guid id, CreateUpdateBlogPostDto input) + public virtual Task UpdateAsync(Guid id, UpdateBlogPostDto input) { return BlogPostAdminAppService.UpdateAsync(id, input); } diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs index efef70cb9b..6516e3fc2c 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs @@ -31,7 +31,7 @@ namespace Volo.CmsKit.Blogs var slug = "my-awesome-new-post"; var shortDescription = "This blog is all about awesomeness 🤗!"; - var created = await blogPostAdminAppService.CreateAsync(new CreateUpdateBlogPostDto + var created = await blogPostAdminAppService.CreateAsync(new CreateBlogPostDto { BlogId = cmsKitTestData.Blog_Id, Title = title, @@ -55,7 +55,7 @@ namespace Volo.CmsKit.Blogs var slug = "another-my-awesome-new-post"; var shortDescription = "This blog is all about awesomeness 🤗!"; - var dto = new CreateUpdateBlogPostDto + var dto = new CreateBlogPostDto { // Non-existing Id BlogId = Guid.NewGuid(), @@ -137,9 +137,8 @@ namespace Volo.CmsKit.Blogs var title = "[Solved] Another Blog Post"; var slug = "another-short-blog-post"; - await blogPostAdminAppService.UpdateAsync(cmsKitTestData.BlogPost_2_Id, new CreateUpdateBlogPostDto + await blogPostAdminAppService.UpdateAsync(cmsKitTestData.BlogPost_2_Id, new UpdateBlogPostDto { - BlogId = cmsKitTestData.Blog_Id, ShortDescription = shortDescription, Title = title, Slug = slug, @@ -152,31 +151,11 @@ namespace Volo.CmsKit.Blogs blogPost.Slug.ShouldBe(slug); } - [Fact] - public async Task UpdateAsync_ShouldThrowException_WhileChangingWithNonExistingBlogId() - { - var nonExistingId = Guid.NewGuid(); - - var dto = new CreateUpdateBlogPostDto - { - BlogId = nonExistingId, - Title = cmsKitTestData.Page_2_Title, - Slug = cmsKitTestData.BlogPost_2_Slug - }; - - var exception = await Should.ThrowAsync(async () => - await blogPostAdminAppService.UpdateAsync(cmsKitTestData.BlogPost_2_Id, dto)); - - exception.EntityType.ShouldBe(typeof(Blog)); - exception.Id.ShouldBe(nonExistingId); - } - [Fact] public async Task UpdateAsync_ShouldThrowException_WhileUpdatingWithAlreadyExistingSlug() { - var dto = new CreateUpdateBlogPostDto + var dto = new UpdateBlogPostDto { - BlogId = cmsKitTestData.Blog_Id, Title = "Some new title", Slug = cmsKitTestData.BlogPost_1_Slug }; From d0ebce4b293454467481f7a8ac73f284cc96b7eb Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 15 Feb 2021 15:13:09 +0300 Subject: [PATCH 007/126] CmsKit - Revert Alternative way to handle pages #a5bf8ebe --- .../CmsKitPublicWebModule.cs | 4 ++ .../Controllers/PageController.cs | 37 ------------------- .../Pages/CmsKit/Pages/Index.cshtml | 13 +++++++ .../Pages/CmsKit/Pages/Index.cshtml.cs | 34 +++++++++++++++++ .../Views/Page/Index.cshtml | 9 ----- 5 files changed, 51 insertions(+), 46 deletions(-) delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml create mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.Web/Views/Page/Index.cshtml diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs index b5c7b9bb3f..953102aa79 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs @@ -61,6 +61,10 @@ namespace Volo.CmsKit.Public.Web { Configure(options => { + if (GlobalFeatureManager.Instance.IsEnabled()) + { + options.Conventions.AddPageRoute("/CmsKit/Pages/Index", @"{*pageUrl:minlength(1)}"); + } }); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs deleted file mode 100644 index 5d3d5acc9c..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.ActionConstraints; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.GlobalFeatures; -using Volo.CmsKit.GlobalFeatures; -using Volo.CmsKit.Public.Pages; - -namespace Volo.CmsKit.Public.Web.Controllers -{ - [RequiresGlobalFeature(typeof(PagesFeature))] - public class PageController : CmsKitPublicControllerBase - { - protected IPageAppService PageAppService { get; } - - public PageController(IPageAppService pageAppService) - { - PageAppService = pageAppService; - } - - //[HttpGet("/{*url}", Order = int.MaxValue)] - public async Task IndexAsync(string url) - { - var page = await PageAppService.FindByUrlAsync(url); - - if (page == null) - { - return NotFound(); - } - - return View("~/Views/Page/Index.cshtml", page); - } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml new file mode 100644 index 0000000000..73c7637b01 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml @@ -0,0 +1,13 @@ +@page "{*pageUrl}" +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.CmsKit.Localization +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages +@model Volo.CmsKit.Public.Web.Pages.CmsKit.Pages.IndexModel +@inject IHtmlLocalizer L + +@await Component.InvokeAsync(typeof(DefaultPageViewComponent), + new + { + pageId = Model.Page.Id, + title = Model.Page.Title + }) \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs new file mode 100644 index 0000000000..5443608845 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs @@ -0,0 +1,34 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.CmsKit.Public.Pages; +using Volo.CmsKit.Web.Pages; + +namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Pages +{ + public class IndexModel : CommonPageModel + { + [BindProperty(SupportsGet = true)] + public string PageUrl { get; set; } + + protected readonly IPageAppService PageAppService; + + public PageDto Page; + + public IndexModel(IPageAppService pageAppService) + { + PageAppService = pageAppService; + } + + public async Task OnGetAsync() + { + Page = await PageAppService.FindByUrlAsync(PageUrl); + + if (Page == null) + { + return NotFound(); + } + + return Page(); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Views/Page/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Views/Page/Index.cshtml deleted file mode 100644 index de094041e4..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Views/Page/Index.cshtml +++ /dev/null @@ -1,9 +0,0 @@ -@model Volo.CmsKit.Public.Pages.PageDto - -@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages - -@await Component.InvokeAsync(typeof(DefaultPageViewComponent), new -{ - pageId = Model.Id, - title = Model.Title -}) \ No newline at end of file From 1a275b39037cf637103b367d3ec4ba7a7e71e072 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 15 Feb 2021 15:14:53 +0300 Subject: [PATCH 008/126] CmsKit - Add 'pages' prefix to page routes --- .../cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs | 2 +- .../src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs index 953102aa79..0295a3857c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs @@ -63,7 +63,7 @@ namespace Volo.CmsKit.Public.Web { if (GlobalFeatureManager.Instance.IsEnabled()) { - options.Conventions.AddPageRoute("/CmsKit/Pages/Index", @"{*pageUrl:minlength(1)}"); + options.Conventions.AddPageRoute("/CmsKit/Pages/Index", @"/pages/{pageUrl:minlength(1)}"); } }); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml index 73c7637b01..eaffa12670 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml @@ -1,4 +1,4 @@ -@page "{*pageUrl}" +@page "/pages/{pageUrl:minlength(1)}" @using Microsoft.AspNetCore.Mvc.Localization @using Volo.CmsKit.Localization @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages From a0fcac78c0e5fe2c69cccf6f619900db697373a5 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 15 Feb 2021 15:24:02 +0300 Subject: [PATCH 009/126] CmsKit - Remove Route attribute from Pages/Index --- .../src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml index eaffa12670..4f4129b6d7 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml @@ -1,4 +1,4 @@ -@page "/pages/{pageUrl:minlength(1)}" +@page @using Microsoft.AspNetCore.Mvc.Localization @using Volo.CmsKit.Localization @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages From 3a003ca4bf9c1227cdf649aff6437af65a6c3acc Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 15 Feb 2021 15:24:23 +0300 Subject: [PATCH 010/126] CmsKit - Re-enable PagesFeature for Unified project --- .../cms-kit/host/Volo.CmsKit.Host.Shared/FeatureConfigurer.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Host.Shared/FeatureConfigurer.cs b/modules/cms-kit/host/Volo.CmsKit.Host.Shared/FeatureConfigurer.cs index b108d08b02..e7963d7c39 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Host.Shared/FeatureConfigurer.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Host.Shared/FeatureConfigurer.cs @@ -13,7 +13,6 @@ namespace Volo.CmsKit OneTimeRunner.Run(() => { GlobalFeatureManager.Instance.Modules.CmsKit().EnableAll(); - GlobalFeatureManager.Instance.Modules.CmsKit().Disable(); }); } } From 82cbfc180c0492552a9bca7379c244d51924aa66 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Feb 2021 10:18:12 +0800 Subject: [PATCH 011/126] Use abp-id-name in FeatureManagementModal.cshtml Resolve #7722 --- .../FeatureManagement/FeatureManagementModal.cshtml | 9 ++++----- .../FeatureManagement/FeatureManagementModal.cshtml.cs | 7 ------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml index f3080b7275..272d6eb8e0 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml @@ -44,14 +44,13 @@ var disabled = Model.IsDisabled(feature.Provider.Name);
- - + @if (feature.ValueType is ToggleStringValueType) { } - +
} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs index d2ccc5a44d..9598c9a46a 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs @@ -75,13 +75,6 @@ namespace Volo.Abp.FeatureManagement.Web.Pages.FeatureManagement return providerName != ProviderName && providerName != DefaultValueFeatureValueProvider.ProviderName; } - public class ProviderInfoViewModel - { - public string ProviderName { get; set; } - - public string ProviderKey { get; set; } - } - public class FeatureGroupViewModel { public List Features { get; set; } From f88b495e54872f87be223f046f0b7326c510bc30 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Feb 2021 10:46:13 +0800 Subject: [PATCH 012/126] Upgrade Swashbuckle.AspNetCore to 6.0. --- framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj index 9a720524d9..d2d0f0f13a 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj +++ b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj @@ -15,7 +15,7 @@ - + From d4203636f09a47b7505d22a75808ada22f5ad203 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Feb 2021 10:51:54 +0800 Subject: [PATCH 013/126] Select scope by default. --- .../MyProjectNameHttpApiHostModule.cs | 1 + .../MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj | 1 - .../MyProjectNameHttpApiHostModule.cs | 1 + .../MyProjectNameHttpApiHostModule.cs | 1 + .../MyCompanyName.MyProjectName.Web.Unified.csproj | 1 - 5 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index 5cf421b265..2bfbe80fdc 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -215,6 +215,7 @@ namespace MyCompanyName.MyProjectName var configuration = context.GetConfiguration(); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); + options.OAuthScopes("MyProjectName"); }); app.UseAuditing(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj index 196166e966..7483325232 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj @@ -12,7 +12,6 @@ - diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs index 9a50940341..79fe76c574 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs @@ -227,6 +227,7 @@ namespace MyCompanyName.MyProjectName var configuration = context.ServiceProvider.GetRequiredService(); c.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); c.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); + c.OAuthScopes("MyProjectName"); }); app.UseAuditing(); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index db77093f0a..c118624476 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -182,6 +182,7 @@ namespace MyCompanyName.MyProjectName var configuration = context.GetConfiguration(); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); + options.OAuthScopes("MyProjectName"); }); app.UseAuditing(); app.UseAbpSerilogEnrichers(); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj index be27176f6c..8124338091 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj @@ -12,7 +12,6 @@ - all runtime; build; native; contentfiles; analyzers From 2f234b73c225b76a6d8567874915f18b76290c97 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Feb 2021 11:05:47 +0800 Subject: [PATCH 014/126] Remove Swashbuckle.AspNetCore package from Volo.CmsKit.Web.Unified.csproj --- .../host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj index f13af43d96..2595a1fde2 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj @@ -10,7 +10,6 @@ - From 04e226f346e04636851bcaf7e0c2762464247aeb Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 26 Jan 2021 11:20:09 +0800 Subject: [PATCH 015/126] Update user properties when it's changed. Resolve #7430 --- .../Volo/Abp/Identity/ProfileAppService.cs | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs index 9097bbc144..ef3b5fd35d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; @@ -37,17 +38,26 @@ namespace Volo.Abp.Identity var user = await UserManager.GetByIdAsync(CurrentUser.GetId()); - if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled)) + if (!string.Equals(user.UserName, input.UserName, StringComparison.InvariantCultureIgnoreCase)) { - (await UserManager.SetUserNameAsync(user, input.UserName)).CheckErrors(); + if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled)) + { + (await UserManager.SetUserNameAsync(user, input.UserName)).CheckErrors(); + } } - if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsEmailUpdateEnabled)) + if (!string.Equals(user.Email, input.Email, StringComparison.InvariantCultureIgnoreCase)) { - (await UserManager.SetEmailAsync(user, input.Email)).CheckErrors(); + if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsEmailUpdateEnabled)) + { + (await UserManager.SetEmailAsync(user, input.Email)).CheckErrors(); + } } - (await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); + if (!string.Equals(user.PhoneNumber, input.PhoneNumber, StringComparison.InvariantCultureIgnoreCase)) + { + (await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); + } user.Name = input.Name; user.Surname = input.Surname; From c7c06c13a3e5242251697781d19d130c86170d2a Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 12:48:54 +0300 Subject: [PATCH 016/126] CmsKit - Add BlogFeature Admin --- .../Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs | 11 +++++ .../Blogs/IBlogFeatureAdminAppService.cs | 15 ++++++ .../Permissions/CmsKitAdminPermissions.cs | 1 + .../Admin/Blogs/BlogFeatureAdminAppService.cs | 46 +++++++++++++++++++ ...CmsKitAdminApplicationAutoMapperProfile.cs | 2 + .../Volo/CmsKit/Blogs/BlogFeatureConsts.cs | 7 +++ .../Volo/CmsKit/Blogs/BlogFeature.cs | 25 ++++++++++ .../Blogs/BlogFeatureDataSeeContributor.cs | 17 +++++++ .../CmsKit/Blogs/IBlogFeatureRepository.cs | 16 +++++++ .../Blogs/EfCoreBlogFeatureRepository.cs | 30 ++++++++++++ .../EntityFrameworkCore/CmsKitDbContext.cs | 1 + .../CmsKitDbContextModelCreatingExtensions.cs | 10 ++++ .../CmsKitEntityFrameworkCoreModule.cs | 1 + .../Blogs/MongoBlogFeatureRepository.cs | 32 +++++++++++++ .../CmsKit/MongoDB/CmsKitMongoDbContext.cs | 4 +- .../MongoDB/CmsKitMongoDbContextExtensions.cs | 5 ++ .../CmsKit/MongoDB/ICmsKitMongoDbContext.cs | 2 + 17 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogFeatureConsts.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureDataSeeContributor.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs new file mode 100644 index 0000000000..afeb23642e --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs @@ -0,0 +1,11 @@ +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Admin.Blogs +{ + public class BlogFeatureDto + { + [Required] + public string FeatureName { get; set; } + public bool Enabled { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs new file mode 100644 index 0000000000..5ddf45d337 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Volo.CmsKit.Admin.Blogs +{ + public interface IBlogFeatureAdminAppService + { + Task SetAsync(Guid blogId, BlogFeatureDto dto); + + Task> GetListAsync(Guid blogId); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs index 4c106d4d3c..d16a911bc7 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs @@ -36,6 +36,7 @@ namespace Volo.CmsKit.Permissions public const string Create = Default + ".Create"; public const string Update = Default + ".Update"; public const string Delete = Default + ".Delete"; + public const string Features = Default + ".Features"; } public static class BlogPosts diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs new file mode 100644 index 0000000000..1831023c19 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -0,0 +1,46 @@ +using Microsoft.AspNetCore.Authorization; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Admin.Blogs; +using Volo.CmsKit.Blogs; +using Volo.CmsKit.Permissions; + +namespace Volo.CmsKit.Admin.Blogs +{ + public class BlogFeatureAdminAppService : CmsKitAdminAppServiceBase, IBlogFeatureAdminAppService + { + protected IBlogFeatureRepository BlogFeatureRepository { get; } + + public BlogFeatureAdminAppService(IBlogFeatureRepository blogFeatureRepository) + { + BlogFeatureRepository = blogFeatureRepository; + } + + [Authorize(CmsKitAdminPermissions.Blogs.Features)] + public async Task> GetListAsync(Guid blogId) + { + var list = await BlogFeatureRepository.GetListAsync(blogId); + + return ObjectMapper.Map, List>(list); + } + + [Authorize(CmsKitAdminPermissions.Blogs.Features)] + public async Task SetAsync(Guid blogId, BlogFeatureDto dto) + { + var existing = await BlogFeatureRepository.FindAsync(blogId, dto.FeatureName); + if (existing == null) + { + var blogFeature = new BlogFeature(blogId, dto.FeatureName, dto.Enabled); + await BlogFeatureRepository.InsertAsync(blogFeature); + } + else + { + existing.Enabled = dto.Enabled; + await BlogFeatureRepository.UpdateAsync(existing); + } + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 33a9d9de84..85f56f5e17 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -31,6 +31,8 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Destination); + CreateMap(); + CreateMap(MemberList.Destination); CreateMap(); diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogFeatureConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogFeatureConsts.cs new file mode 100644 index 0000000000..b030d97ba5 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogFeatureConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.CmsKit.Blogs +{ + public static class BlogFeatureConsts + { + public const int MaxFeatureNameLenth = 64; + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs new file mode 100644 index 0000000000..59a26fc1a1 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs @@ -0,0 +1,25 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; + +namespace Volo.CmsKit.Blogs +{ + public class BlogFeature : FullAuditedAggregateRoot + { + protected BlogFeature() // Keep for ORM + { + } + + public BlogFeature(Guid blogId, string featureName, bool enabled = true) + { + BlogId = blogId; + FeatureName = featureName; + Enabled = enabled; + } + + public Guid BlogId { get; protected set; } + + public string FeatureName { get; protected set; } + + public bool Enabled { get; set; } = true; + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureDataSeeContributor.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureDataSeeContributor.cs new file mode 100644 index 0000000000..c3d8dcce53 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureDataSeeContributor.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Data; + +namespace Volo.CmsKit.Blogs +{ + public class BlogFeatureDataSeeContributor : IDataSeedContributor + { + public Task SeedAsync(DataSeedContext context) + { + throw new NotImplementedException(); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs new file mode 100644 index 0000000000..622ac33338 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Volo.CmsKit.Blogs +{ + public interface IBlogFeatureRepository : IBasicRepository + { + Task> GetListAsync(Guid blogId); + + Task FindAsync(Guid blogId, string featureName); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs new file mode 100644 index 0000000000..80b2cbcf12 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Blogs +{ + public class EfCoreBlogFeatureRepository : EfCoreRepository, IBlogFeatureRepository + { + public EfCoreBlogFeatureRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public Task FindAsync(Guid blogId, string featureName) + { + return base.FindAsync(x => x.BlogId == blogId && x.FeatureName == featureName); + } + + public async Task> GetListAsync(Guid blogId) + { + return await (await GetQueryableAsync()) + .Where(x => x.BlogId == blogId) + .ToListAsync(); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContext.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContext.cs index 17a5dc5c34..749a0653f9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContext.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContext.cs @@ -26,6 +26,7 @@ namespace Volo.CmsKit.EntityFrameworkCore public DbSet Pages { get; set; } public DbSet Blogs { get; set; } public DbSet BlogPosts { get; set; } + public DbSet BlogFeatures { get; set; } public DbSet MediaDescriptors { get; set; } public CmsKitDbContext(DbContextOptions options) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs index 9f0ac813fc..273db5ade1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs @@ -216,11 +216,21 @@ namespace Volo.CmsKit.EntityFrameworkCore b.HasIndex(x => new { x.Slug, x.BlogId }); }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "BlogFeatures", options.Schema); + + b.ConfigureByConvention(); + + b.Property(p => p.FeatureName).IsRequired().HasMaxLength(BlogFeatureConsts.MaxFeatureNameLenth); + }); } else { builder.Ignore(); builder.Ignore(); + builder.Ignore(); } if (GlobalFeatureManager.Instance.IsEnabled()) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitEntityFrameworkCoreModule.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitEntityFrameworkCoreModule.cs index e67a4f2d1b..335bbb9f78 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitEntityFrameworkCoreModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitEntityFrameworkCoreModule.cs @@ -35,6 +35,7 @@ namespace Volo.CmsKit.EntityFrameworkCore options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); options.AddRepository(); }); } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs new file mode 100644 index 0000000000..b369345890 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using MongoDB.Driver.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.Blogs; +using MongoDB.Driver; + +namespace Volo.CmsKit.MongoDB.Blogs +{ + public class MongoBlogFeatureRepository : MongoDbRepository , IBlogFeatureRepository + { + public MongoBlogFeatureRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public Task FindAsync(Guid blogId, string featureName) + { + return base.FindAsync(x => x.BlogId == blogId && x.FeatureName == featureName); + } + + public async Task> GetListAsync(Guid blogId) + { + return await (await GetMongoQueryableAsync()) + .Where(x => x.BlogId == blogId) + .ToListAsync(); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContext.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContext.cs index a62ed224df..cd03531448 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContext.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContext.cs @@ -36,7 +36,9 @@ namespace Volo.CmsKit.MongoDB public IMongoCollection Blogs => Collection(); public IMongoCollection BlogPosts => Collection(); - + + public IMongoCollection BlogFeatures => Collection(); + public IMongoCollection MediaDescriptors => Collection(); protected override void CreateModel(IMongoModelBuilder modelBuilder) diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs index f4e46a38fa..2a542472d2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs @@ -76,6 +76,11 @@ namespace Volo.CmsKit.MongoDB { x.CollectionName = CmsKitDbProperties.DbTablePrefix + "BlogPosts"; }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "BlogFeatures"; + }); builder.Entity(x => { diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/ICmsKitMongoDbContext.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/ICmsKitMongoDbContext.cs index f3cf7064f8..742d40dfc6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/ICmsKitMongoDbContext.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/ICmsKitMongoDbContext.cs @@ -36,6 +36,8 @@ namespace Volo.CmsKit.MongoDB IMongoCollection Blogs { get; } IMongoCollection BlogPosts { get; } + + IMongoCollection BlogFeatures { get; } IMongoCollection MediaDescriptors { get; } } From 16261a9d7704ccae9d7643cf89eaf4f9af7149d2 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 12:49:05 +0300 Subject: [PATCH 017/126] CmsKit - Add BlogFeature Admin Tests --- .../Blogs/BlogFeatureAdminAppService.cs | 67 +++++++++++++++++++ .../Blogs/BlogFeatureRepository_Test.cs | 14 ++++ .../Blogs/BlogFeatureRepository_Test.cs | 14 ++++ .../Blogs/BlogFeatureRepository_Test.cs | 58 ++++++++++++++++ .../CmsKitDataSeedContributor.cs | 24 +++++++ .../Volo.CmsKit.TestBase/CmsKitTestData.cs | 12 ++++ 6 files changed, 189 insertions(+) create mode 100644 modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService.cs create mode 100644 modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Blogs/BlogFeatureRepository_Test.cs create mode 100644 modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Blogs/BlogFeatureRepository_Test.cs create mode 100644 modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService.cs new file mode 100644 index 0000000000..7bfa061e4d --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService.cs @@ -0,0 +1,67 @@ +using Shouldly; +using System.Threading.Tasks; +using Volo.CmsKit.Admin.Blogs; +using Xunit; + +namespace Volo.CmsKit.Blogs +{ + public class BlogFeatureAdminAppService : CmsKitApplicationTestBase + { + private readonly CmsKitTestData testData; + private readonly IBlogFeatureAdminAppService blogFeatureAdminAppService; + private readonly IBlogFeatureRepository blogFeatureRepository; + + public BlogFeatureAdminAppService() + { + testData = GetRequiredService(); + blogFeatureAdminAppService = GetRequiredService(); + blogFeatureRepository = GetRequiredService(); + } + + [Fact] + public async Task SetAsync_ShouldWorkProperly_WithNonExistingFeature() + { + var dto = new BlogFeatureDto + { + FeatureName = "My.Awesome.Feature", + Enabled = true + }; + + await blogFeatureAdminAppService.SetAsync(testData.Blog_Id, dto); + + var feature = await blogFeatureRepository.FindAsync(testData.Blog_Id, dto.FeatureName); + + feature.ShouldNotBeNull(); + feature.BlogId.ShouldBe(testData.Blog_Id); + feature.Enabled.ShouldBe(dto.Enabled); + } + + [Fact] + public async Task SetAsync_ShouldWorkProperly_WithExistingFeature() + { + var dto = new BlogFeatureDto + { + FeatureName = testData.BlogFeature_2_FeatureName, + Enabled = !testData.BlogFeature_2_Enabled + }; + + await blogFeatureAdminAppService.SetAsync(testData.Blog_Id, dto); + + var feature = await blogFeatureRepository.FindAsync(testData.Blog_Id, dto.FeatureName); + + feature.ShouldNotBeNull(); + feature.BlogId.ShouldBe(testData.Blog_Id); + feature.Enabled.ShouldBe(dto.Enabled); + } + + [Fact] + public async Task GetListAsync_ShouldWorkProperly_WithBlogId() + { + var result = await blogFeatureAdminAppService.GetListAsync(testData.Blog_Id); + + result.ShouldNotBeNull(); + result.ShouldNotBeEmpty(); + result.Count.ShouldBe(2); + } + } +} diff --git a/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Blogs/BlogFeatureRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Blogs/BlogFeatureRepository_Test.cs new file mode 100644 index 0000000000..d6acb2b162 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Blogs/BlogFeatureRepository_Test.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Blogs; + +namespace Volo.CmsKit.EntityFrameworkCore.Blogs +{ + public class BlogFeatureRepository_Test : BlogFeatureRepository_Test + { + + } +} diff --git a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Blogs/BlogFeatureRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Blogs/BlogFeatureRepository_Test.cs new file mode 100644 index 0000000000..35ccc0664c --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Blogs/BlogFeatureRepository_Test.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Blogs; + +namespace Volo.CmsKit.MongoDB.Blogs +{ + public class BlogFeatureRepository_Test : BlogFeatureRepository_Test + { + + } +} diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs new file mode 100644 index 0000000000..3c1e77976f --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs @@ -0,0 +1,58 @@ +using Shouldly; +using System; +using System.Threading.Tasks; +using Volo.Abp.Modularity; +using Xunit; + +namespace Volo.CmsKit.Blogs +{ + public abstract class BlogFeatureRepository_Test : CmsKitTestBase + where TStartupModule : IAbpModule + { + private readonly CmsKitTestData testData; + private readonly IBlogFeatureRepository blogFeatureRepository; + public BlogFeatureRepository_Test() + { + testData = GetRequiredService(); + blogFeatureRepository = GetRequiredService(); + } + + [Fact] + public async Task GetListAsync_ShouldWorkProperly_WithBlogId() + { + var result = await blogFeatureRepository.GetListAsync(testData.Blog_Id); + + result.ShouldNotBeNull(); + result.ShouldNotBeEmpty(); + result.Count.ShouldBe(2); + } + + [Fact] + public async Task FindAsync_ShouldWorkProperly_WithExistingFeatureName() + { + var result = await blogFeatureRepository.FindAsync(testData.Blog_Id, testData.BlogFeature_1_FeatureName); + + result.ShouldNotBeNull(); + result.FeatureName.ShouldBe(testData.BlogFeature_1_FeatureName); + result.Enabled.ShouldBe(testData.BlogFeature_1_Enabled); + } + + [Fact] + public async Task FindAsync_ShouldReturnNull_WithNonExistingFeatureName() + { + var nonExistingFeatureName = "Some.Feature"; + var result = await blogFeatureRepository.FindAsync(testData.Blog_Id, nonExistingFeatureName); + + result.ShouldBeNull(); + } + + [Fact] + public async Task FindAsync_ShouldReturnNull_WithNonExistingBlogId() + { + var nonExistingBlogId = Guid.NewGuid(); + var result = await blogFeatureRepository.FindAsync(nonExistingBlogId, testData.BlogFeature_1_FeatureName); + + result.ShouldBeNull(); + } + } +} diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs index 68a65de89e..4089be4053 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs @@ -39,6 +39,7 @@ namespace Volo.CmsKit private readonly IEntityTagRepository _entityTagRepository; private readonly IPageRepository _pageRepository; private readonly IBlogRepository _blogRepository; + private readonly IBlogFeatureRepository _blogFeatureRepository; private readonly IBlogPostRepository _blogPostRepository; private readonly IOptions _options; private readonly IOptions _tagOptions; @@ -59,6 +60,7 @@ namespace Volo.CmsKit IPageRepository pageRepository, IBlogRepository blogRepository, IBlogPostRepository blogPostRepository, + IBlogFeatureRepository blogFeatureRepository, IEntityTagManager entityTagManager, IOptions options, IOptions tagOptions, @@ -79,6 +81,7 @@ namespace Volo.CmsKit _pageRepository = pageRepository; _blogRepository = blogRepository; _blogPostRepository = blogPostRepository; + _blogFeatureRepository = blogFeatureRepository; _options = options; _tagOptions = tagOptions; _mediaDescriptorRepository = mediaDescriptorRepository; @@ -107,6 +110,8 @@ namespace Volo.CmsKit await SeedBlogsAsync(); + await SeedBlogFeaturesAsync(); + await SeedMediaAsync(); } } @@ -327,6 +332,25 @@ namespace Volo.CmsKit await _blogPostRepository.InsertAsync(new BlogPost(_cmsKitTestData.BlogPost_2_Id, blog.Id, _cmsKitTestData.BlogPost_2_Title, _cmsKitTestData.BlogPost_2_Slug, "Short desc 2")); } + private async Task SeedBlogFeaturesAsync() + { + var blogFeature1 = await _blogFeatureRepository.InsertAsync( + new BlogFeature( + _cmsKitTestData.Blog_Id, + _cmsKitTestData.BlogFeature_1_FeatureName, + _cmsKitTestData.BlogFeature_1_Enabled)); + + _cmsKitTestData.BlogFeature_1_Id = blogFeature1.Id; + + var blogFeature2 = await _blogFeatureRepository.InsertAsync( + new BlogFeature( + _cmsKitTestData.Blog_Id, + _cmsKitTestData.BlogFeature_2_FeatureName, + _cmsKitTestData.BlogFeature_2_Enabled)); + + _cmsKitTestData.BlogFeature_2_Id = blogFeature2.Id; + } + private async Task SeedMediaAsync() { using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(_cmsKitTestData.Media_1_Content))) diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs index b0b4a5b1ba..7c72bf68cb 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs @@ -91,6 +91,18 @@ namespace Volo.CmsKit public string BlogPost_2_Slug => "how-to-use-cms-kit"; + public Guid BlogFeature_1_Id { get; internal set; } = Guid.NewGuid(); + + public string BlogFeature_1_FeatureName => "Tagging"; + + public bool BlogFeature_1_Enabled => true; + + public Guid BlogFeature_2_Id { get; internal set; } = Guid.NewGuid(); + + public string BlogFeature_2_FeatureName => "Rating"; + + public bool BlogFeature_2_Enabled => false; + public Guid Media_1_Id { get; } = Guid.NewGuid(); public string Media_1_Content = "Hi, this is text file"; From 2912af84456244ad75e7bf400ee23f101422c751 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 13:11:16 +0300 Subject: [PATCH 018/126] CmsKit - Add BlogFeatureAdminController & Permissions --- ...CmsKitAdminPermissionDefinitionProvider.cs | 1 + .../Admin/Blogs/BlogFeatureAdminController.cs | 41 +++++++++++++++++++ .../CmsKit/Localization/Resources/en.json | 11 ++--- .../CmsKit/Localization/Resources/tr.json | 1 + 4 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs index a5a30a60ef..672eabbd5f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs @@ -42,6 +42,7 @@ namespace Volo.CmsKit.Permissions blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Create, L("Permission:BlogManagement.Create")); blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Update, L("Permission:BlogManagement.Update")); blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Delete, L("Permission:BlogManagement.Delete")); + blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Features, L("Permission:BlogManagement.Features")); var blogPostManagement = cmsGroup.AddPermission(CmsKitAdminPermissions.BlogPosts.Default, L("Permission:BlogPostManagement")); blogManagement.AddChild(CmsKitAdminPermissions.BlogPosts.Create, L("Permission:BlogPostManagement.Create")); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs new file mode 100644 index 0000000000..7a00146b92 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs @@ -0,0 +1,41 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.GlobalFeatures; +using Volo.CmsKit.GlobalFeatures; +using Volo.CmsKit.Permissions; + +namespace Volo.CmsKit.Admin.Blogs +{ + [RequiresGlobalFeature(typeof(BlogsFeature))] + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Authorize(CmsKitAdminPermissions.Blogs.Features)] + [Route("api/cms-kit-admin/blogs/{blogId}/features")] + public class BlogFeatureAdminController : CmsKitAdminController, IBlogFeatureAdminAppService + { + protected IBlogFeatureAdminAppService BlogFeatureAdminAppService { get; } + + public BlogFeatureAdminController(IBlogFeatureAdminAppService blogFeatureAdminAppService) + { + BlogFeatureAdminAppService = blogFeatureAdminAppService; + } + + [HttpGet] + public Task> GetListAsync(Guid blogId) + { + return BlogFeatureAdminAppService.GetListAsync(blogId); + } + + [HttpPut] + public Task SetAsync(Guid blogId, BlogFeatureDto dto) + { + return BlogFeatureAdminAppService.SetAsync(blogId, dto); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json index 7b7dd69308..d91ef6744d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json @@ -4,6 +4,7 @@ "CmsKit:0002": "Content already exists!", "CmsKit:0003": "The entity {0} is not taggable.", "CmsKit:BlogPost:0001": "Same url slug already exists!", + "CmsKit:Media:0001": "'{Name}' is not a valid media name.", "CmsKit:Page:0001": "The given url ({0}) already exists.", "CmsKit:Tag:0002": "The entity is not taggable!", "CommentAuthorizationExceptionMessage": "Those comments are not allowed for public display.", @@ -16,11 +17,15 @@ "LoginToReply": "Login to reply", "Menu:CMS": "CMS", "MessageDeletionConfirmationMessage": "This comment will be deleted completely.", + "Permission:BlogManagement.Features": "Features", "Permission:CmsKit": "CmsKit", "Permission:Contents": "Content Management", "Permission:Contents.Create": "Create Content", "Permission:Contents.Delete": "Delete Content", "Permission:Contents.Update": "Update Content", + "Permission:MediaDescriptorManagement": "Media Management", + "Permission:MediaDescriptorManagement:Create": "Create", + "Permission:MediaDescriptorManagement:Delete": "Delete", "Permission:PageManagement": "Page Management", "Permission:PageManagement:Create": "Create", "Permission:PageManagement:Delete": "Delete", @@ -40,10 +45,6 @@ "Undo": "Undo", "Update": "Update", "YourComment": "Your comment", - "YourReply": "Your reply", - "CmsKit:Media:0001": "'{Name}' is not a valid media name.", - "Permission:MediaDescriptorManagement": "Media Management", - "Permission:MediaDescriptorManagement:Create": "Create", - "Permission:MediaDescriptorManagement:Delete": "Delete" + "YourReply": "Your reply" } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json index 7d77c0649b..af032d5480 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json @@ -16,6 +16,7 @@ "LoginToReply": "Cevap vermek için giriş yap", "Menu:CMS": "CMS", "MessageDeletionConfirmationMessage": "Bu yorum tamamen silinecektir", + "Permission:BlogManagement.Features": "Özellikler", "Permission:CmsKit": "CmsKit", "Permission:Contents": "İçerik Yönetimi", "Permission:Contents.Create": "İçerik Oluşturma", From e71051b15c5602c555fd3abbecf1af1cf9a9dcee Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 13:56:47 +0300 Subject: [PATCH 019/126] CmsKit - BlogFeature public implementation --- .../Volo/CmsKit/Blogs/BlogPostConsts.cs | 6 ++ .../Volo/CmsKit/Blogs/BlogFeature.cs | 8 ++- .../CmsKit/Blogs/IBlogFeatureRepository.cs | 2 + .../Blogs/EfCoreBlogFeatureRepository.cs | 7 +++ .../Blogs/MongoBlogFeatureRepository.cs | 7 +++ .../CmsKit/Public/Blogs/BlogFeatureDto.cs | 11 ++++ .../Public/Blogs/GetBlogFeatureInput.cs | 13 ++++ .../Blogs/IBlogFeaturePublicAppService.cs | 13 ++++ .../Volo.CmsKit.Public.Application.csproj | 1 + .../Blogs/BlogFeaturePublicAppService.cs | 61 +++++++++++++++++++ .../Public/CmsKitPublicApplicationModule.cs | 4 +- .../PublicApplicationAutoMapperProfile.cs | 2 + .../Blogs/BlogFeaturePublicController.cs | 34 +++++++++++ .../Pages/CmsKit/Blogs/BlogPost.cshtml | 34 +++++++---- .../Pages/CmsKit/Blogs/BlogPost.cshtml.cs | 34 ++++++++++- 15 files changed, 219 insertions(+), 18 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostConsts.cs index 97b67416cf..2acd2cdeba 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostConsts.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostConsts.cs @@ -11,5 +11,11 @@ public static int MaxShortDescriptionLength { get; set; } = 256; public const string EntityType = "BlogPost"; + + public const string CommentsFeatureName = "Comments"; + + public const string ReactionsFeatureName = "Reactions"; + + public const string RatingsFeatureName = "Ratings"; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs index 59a26fc1a1..eec8223d89 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs @@ -1,4 +1,6 @@ -using System; +using JetBrains.Annotations; +using System; +using Volo.Abp; using Volo.Abp.Domain.Entities.Auditing; namespace Volo.CmsKit.Blogs @@ -9,10 +11,10 @@ namespace Volo.CmsKit.Blogs { } - public BlogFeature(Guid blogId, string featureName, bool enabled = true) + public BlogFeature(Guid blogId, [NotNull] string featureName, bool enabled = true) { BlogId = blogId; - FeatureName = featureName; + FeatureName = Check.NotNullOrWhiteSpace(featureName, nameof(featureName)); Enabled = enabled; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs index 622ac33338..b7ba075e92 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs @@ -11,6 +11,8 @@ namespace Volo.CmsKit.Blogs { Task> GetListAsync(Guid blogId); + Task> GetListAsync(Guid blogId, string[] featureNames); + Task FindAsync(Guid blogId, string featureName); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs index 80b2cbcf12..ee3b7cc4a5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs @@ -26,5 +26,12 @@ namespace Volo.CmsKit.Blogs .Where(x => x.BlogId == blogId) .ToListAsync(); } + + public async Task> GetListAsync(Guid blogId, string[] featureNames) + { + return await (await GetQueryableAsync()) + .Where(x => x.BlogId == blogId && featureNames.Contains(x.FeatureName)) + .ToListAsync(); + } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs index b369345890..69613c01f2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs @@ -28,5 +28,12 @@ namespace Volo.CmsKit.MongoDB.Blogs .Where(x => x.BlogId == blogId) .ToListAsync(); } + + public async Task> GetListAsync(Guid blogId, string[] featureNames) + { + return await (await GetMongoQueryableAsync()) + .Where(x => x.BlogId == blogId && featureNames.Contains(x.FeatureName)) + .ToListAsync(); + } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs new file mode 100644 index 0000000000..8fb4aa1fd5 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs @@ -0,0 +1,11 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Public.Blogs +{ + public class BlogFeatureDto : EntityDto + { + public string FeatureName { get; set; } + public bool Enabled { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs new file mode 100644 index 0000000000..a98dfbc264 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Volo.CmsKit.Public.Blogs +{ + public class GetBlogFeatureInput + { + public string[] FeatureNames { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs new file mode 100644 index 0000000000..017da5d2d3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Volo.CmsKit.Public.Blogs +{ + public interface IBlogFeaturePublicAppService + { + Task GetAsync(Guid blogId, string featureName); + + Task> GetManyAsync(Guid blogId, GetBlogFeatureInput input); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj index 702523e3c6..5460e29406 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj @@ -11,6 +11,7 @@ + diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs new file mode 100644 index 0000000000..7cc9088a81 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs @@ -0,0 +1,61 @@ +using Microsoft.Extensions.Caching.Distributed; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Caching; +using Volo.CmsKit.Blogs; + +namespace Volo.CmsKit.Public.Blogs +{ + public class BlogFeaturePublicAppService : CmsKitPublicAppServiceBase, IBlogFeaturePublicAppService + { + protected IBlogFeatureRepository BlogFeatureRepository { get; } + protected IDistributedCache Cache { get; } + + public BlogFeaturePublicAppService( + IBlogFeatureRepository blogFeatureRepository, + IDistributedCache cache) + { + BlogFeatureRepository = blogFeatureRepository; + Cache = cache; + } + + public async Task GetAsync(Guid blogId, string featureName) + { + return await Cache.GetOrAddAsync( + $"{blogId}_{featureName}", + () => GetFromDatabaseAsync(blogId, featureName), + () => new DistributedCacheEntryOptions + { + AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1) + }); + } + + private async Task GetFromDatabaseAsync(Guid blogId, string featureName) + { + var feature = await BlogFeatureRepository.FindAsync(blogId, featureName); + if (feature == null) + { + feature = new BlogFeature(blogId, featureName); + } + + return ObjectMapper.Map(feature); + } + + public async Task> GetManyAsync(Guid blogId, GetBlogFeatureInput input) + { + var features = await BlogFeatureRepository.GetListAsync(blogId); + + var nonExistingFeatures = input.FeatureNames.Where(x => !features.Any(a => a.FeatureName == x)); + + foreach (var featureName in nonExistingFeatures) + { + features.Add(new BlogFeature(blogId, featureName)); + } + + return ObjectMapper.Map, List>(features); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationModule.cs index c8cda19e68..ede4a7ef29 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationModule.cs @@ -1,12 +1,14 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AutoMapper; +using Volo.Abp.Caching; using Volo.Abp.Modularity; namespace Volo.CmsKit.Public { [DependsOn( typeof(CmsKitCommonApplicationModule), - typeof(CmsKitPublicApplicationContractsModule) + typeof(CmsKitPublicApplicationContractsModule), + typeof(AbpCachingModule) )] public class CmsKitPublicApplicationModule : AbpModule { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs index 46dab5a9a1..ee8a09e8df 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs @@ -34,6 +34,8 @@ namespace Volo.CmsKit.Public CreateMap(); CreateMap(MemberList.None); + + CreateMap(); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs new file mode 100644 index 0000000000..2dd480b78f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs @@ -0,0 +1,34 @@ +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Public.Blogs; + +namespace Volo.CmsKit.Public.HttpApi.Volo.CmsKit.Public.Blogs +{ + public class BlogFeaturePublicController : CmsKitPublicControllerBase, IBlogFeaturePublicAppService + { + protected IBlogFeaturePublicAppService BlogFeaturePublicAppService { get; } + + public BlogFeaturePublicController(IBlogFeaturePublicAppService blogFeaturePublicAppService) + { + BlogFeaturePublicAppService = blogFeaturePublicAppService; + } + + [HttpGet] + [Route("{blogId}/{featureName}")] + public Task GetAsync(Guid blogId, string featureName) + { + return BlogFeaturePublicAppService.GetAsync(blogId, featureName); + } + + [HttpGet] + [Route("{blogId}")] + public Task> GetManyAsync(Guid blogId, GetBlogFeatureInput input) + { + return BlogFeaturePublicAppService.GetManyAsync(blogId, input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml index 51472ce7c1..763b5ac36b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml @@ -35,29 +35,39 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new + if (Model.ReactionsFeature?.Enabled == true) { - entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, - entityId = Model.BlogPost.Id.ToString() - }) + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new + { + entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, + entityId = Model.BlogPost.Id.ToString() + }) + + } } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(RatingViewComponent), new + if (Model.RatingsFeature?.Enabled == true) { - entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, - entityId = Model.BlogPost.Id.ToString() - }) + @await Component.InvokeAsync(typeof(RatingViewComponent), new + { + entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, + entityId = Model.BlogPost.Id.ToString() + }) + } }
@if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(DefaultBlogPostCommentViewComponent), new + if (Model.CommentsFeature?.Enabled == true) { - entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, - entityId = Model.BlogPost.Id.ToString() - }) + @await Component.InvokeAsync(typeof(DefaultBlogPostCommentViewComponent), new + { + entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, + entityId = Model.BlogPost.Id.ToString() + }) + } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs index a3f31bb9a2..7c3fb4fa64 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs @@ -2,8 +2,12 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; +using Volo.Abp.GlobalFeatures; +using Volo.CmsKit.Blogs; +using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.Public.Blogs; namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Blogs @@ -18,16 +22,42 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Blogs public BlogPostPublicDto BlogPost { get; private set; } + public BlogFeatureDto CommentsFeature { get; private set; } + + public BlogFeatureDto ReactionsFeature { get; private set; } + + public BlogFeatureDto RatingsFeature { get; private set; } + protected IBlogPostPublicAppService BlogPostPublicAppService { get; } - public BlogPostModel(IBlogPostPublicAppService blogPostPublicAppService) + protected IBlogFeaturePublicAppService BlogFeaturePublicAppService { get; } + + public BlogPostModel( + IBlogPostPublicAppService blogPostPublicAppService, + IBlogFeaturePublicAppService blogFeaturePublicAppService) { BlogPostPublicAppService = blogPostPublicAppService; + BlogFeaturePublicAppService = blogFeaturePublicAppService; } - public async Task OnGetAsync() + public virtual async Task OnGetAsync() { BlogPost = await BlogPostPublicAppService.GetAsync(BlogSlug, BlogPostSlug); + + if (GlobalFeatureManager.Instance.IsEnabled()) + { + CommentsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.Id, BlogPostConsts.CommentsFeatureName); + } + + if (GlobalFeatureManager.Instance.IsEnabled()) + { + ReactionsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.Id, BlogPostConsts.ReactionsFeatureName); + } + + if (GlobalFeatureManager.Instance.IsEnabled()) + { + RatingsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.Id, BlogPostConsts.RatingsFeatureName); + } } } } From c56189a8b24d00b5a3f74fb8406a45ac6d63042e Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 13:56:59 +0300 Subject: [PATCH 020/126] CmsKit - BlogFeature public tests --- ....cs => BlogFeatureAdminAppService_Test.cs} | 4 +- .../Blogs/BlogFeaturePublicAppService_Test.cs | 43 +++++++++++++++++++ .../Blogs/BlogFeatureRepository_Test.cs | 10 +++++ 3 files changed, 55 insertions(+), 2 deletions(-) rename modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/{BlogFeatureAdminAppService.cs => BlogFeatureAdminAppService_Test.cs} (94%) create mode 100644 modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs similarity index 94% rename from modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService.cs rename to modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs index 7bfa061e4d..41792902c4 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs @@ -5,13 +5,13 @@ using Xunit; namespace Volo.CmsKit.Blogs { - public class BlogFeatureAdminAppService : CmsKitApplicationTestBase + public class BlogFeatureAdminAppService_Test : CmsKitApplicationTestBase { private readonly CmsKitTestData testData; private readonly IBlogFeatureAdminAppService blogFeatureAdminAppService; private readonly IBlogFeatureRepository blogFeatureRepository; - public BlogFeatureAdminAppService() + public BlogFeatureAdminAppService_Test() { testData = GetRequiredService(); blogFeatureAdminAppService = GetRequiredService(); diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs new file mode 100644 index 0000000000..3376173986 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs @@ -0,0 +1,43 @@ +using Shouldly; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Public.Blogs; +using Xunit; + +namespace Volo.CmsKit.Blogs +{ + public class BlogFeaturePublicAppService_Test : CmsKitApplicationTestBase + { + private readonly CmsKitTestData testData; + private readonly IBlogFeaturePublicAppService blogFeaturePublicAppService; + + public BlogFeaturePublicAppService_Test() + { + testData = GetRequiredService(); + blogFeaturePublicAppService = GetRequiredService(); + } + + [Fact] + public async Task GetAsync_ShouldWorkProperly_WithExistingFeatureName() + { + var result = await blogFeaturePublicAppService.GetAsync(testData.Blog_Id, testData.BlogFeature_1_FeatureName); + + result.ShouldNotBeNull(); + result.FeatureName.ShouldBe(testData.BlogFeature_1_FeatureName); + } + + [Fact] + public async Task GetAsync_ShouldReturnDefault_WithNonExistingFeatureName() + { + var nonExistingFeatureName = "AnyOtherFeature"; + var result = await blogFeaturePublicAppService.GetAsync(testData.Blog_Id, nonExistingFeatureName); + + var defaultFeature = new BlogFeature(Guid.Empty, nonExistingFeatureName); + result.ShouldNotBeNull(); + result.Enabled.ShouldBe(defaultFeature.Enabled); + } + } +} diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs index 3c1e77976f..af8531425f 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs @@ -27,6 +27,16 @@ namespace Volo.CmsKit.Blogs result.Count.ShouldBe(2); } + [Fact] + public async Task GetListAsync_ShouldWorkProperly_WithBlogIdWithFeatureNames() + { + var result = await blogFeatureRepository.GetListAsync(testData.Blog_Id, new[] { testData.BlogFeature_1_FeatureName }); + + result.ShouldNotBeNull(); + result.ShouldNotBeEmpty(); + result.Count.ShouldBe(1); + } + [Fact] public async Task FindAsync_ShouldWorkProperly_WithExistingFeatureName() { From 0eec8800c8e7d8414d8da0d9f9f7f369f9006fe7 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 14:00:15 +0300 Subject: [PATCH 021/126] CmsKit - Remove GetMany from BlogFeature --- .../Public/Blogs/IBlogFeaturePublicAppService.cs | 2 -- .../Public/Blogs/BlogFeaturePublicAppService.cs | 14 -------------- .../Public/Blogs/BlogFeaturePublicController.cs | 7 ------- 3 files changed, 23 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs index 017da5d2d3..4606198932 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs @@ -7,7 +7,5 @@ namespace Volo.CmsKit.Public.Blogs public interface IBlogFeaturePublicAppService { Task GetAsync(Guid blogId, string featureName); - - Task> GetManyAsync(Guid blogId, GetBlogFeatureInput input); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs index 7cc9088a81..2e8e553a6c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs @@ -43,19 +43,5 @@ namespace Volo.CmsKit.Public.Blogs return ObjectMapper.Map(feature); } - - public async Task> GetManyAsync(Guid blogId, GetBlogFeatureInput input) - { - var features = await BlogFeatureRepository.GetListAsync(blogId); - - var nonExistingFeatures = input.FeatureNames.Where(x => !features.Any(a => a.FeatureName == x)); - - foreach (var featureName in nonExistingFeatures) - { - features.Add(new BlogFeature(blogId, featureName)); - } - - return ObjectMapper.Map, List>(features); - } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs index 2dd480b78f..6c3579da4b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs @@ -23,12 +23,5 @@ namespace Volo.CmsKit.Public.HttpApi.Volo.CmsKit.Public.Blogs { return BlogFeaturePublicAppService.GetAsync(blogId, featureName); } - - [HttpGet] - [Route("{blogId}")] - public Task> GetManyAsync(Guid blogId, GetBlogFeatureInput input) - { - return BlogFeaturePublicAppService.GetManyAsync(blogId, input); - } } } From 285a78790b4ac374c4b773e2c7633bad1b8585d3 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 14:28:32 +0300 Subject: [PATCH 022/126] CmsKit - Add BlogFeature migrations to Unified project --- .../20210216112738_BlogFeatures.Designer.cs | 1951 +++++++++++++++++ .../Migrations/20210216112738_BlogFeatures.cs | 40 + .../UnifiedDbContextModelSnapshot.cs | 62 + 3 files changed, 2053 insertions(+) create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.Designer.cs create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.cs diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.Designer.cs new file mode 100644 index 0000000000..c043de5396 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.Designer.cs @@ -0,0 +1,1951 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + [Migration("20210216112738_BlogFeatures")] + partial class BlogFeatures + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.3") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + 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.BlobStoring.Database.DatabaseBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .HasMaxLength(2147483647) + .HasColumnType("varbinary(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ContainerId"); + + b.HasIndex("TenantId", "ContainerId", "Name"); + + b.ToTable("AbpBlobs"); + }); + + modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AbpBlobContainers"); + }); + + 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.CmsKit.Blogs.Blog", 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.Property("Slug") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsBlogs"); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogFeature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .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("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeatureName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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.HasKey("Id"); + + b.ToTable("CmsBlogFeatures"); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .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("ShortDescription") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.HasIndex("DeleterId"); + + b.HasIndex("LastModifierId"); + + b.HasIndex("Slug", "BlogId"); + + b.ToTable("CmsBlogPosts"); + }); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments"); + }); + + modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsContents"); + }); + + modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", 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("MimeType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Size") + .HasMaxLength(2147483647) + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsMediaDescriptors"); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReactionName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); + + b.ToTable("CmsUserReactions"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + 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("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers"); + }); + + 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.BlobStoring.Database.DatabaseBlob", b => + { + b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) + .WithMany() + .HasForeignKey("ContainerId") + .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.CmsKit.Blogs.BlogPost", b => + { + b.HasOne("Volo.CmsKit.Users.CmsUser", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.HasOne("Volo.CmsKit.Users.CmsUser", "Deleter") + .WithMany() + .HasForeignKey("DeleterId"); + + b.HasOne("Volo.CmsKit.Users.CmsUser", "LastModifier") + .WithMany() + .HasForeignKey("LastModifierId"); + + b.Navigation("Creator"); + + b.Navigation("Deleter"); + + b.Navigation("LastModifier"); + }); + + 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.cs new file mode 100644 index 0000000000..367cf1d92c --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.cs @@ -0,0 +1,40 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Volo.CmsKit.Migrations +{ + public partial class BlogFeatures : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "CmsBlogFeatures", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BlogId = table.Column(type: "uniqueidentifier", nullable: false), + FeatureName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Enabled = 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_CmsBlogFeatures", x => x.Id); + }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "CmsBlogFeatures"); + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 80080860e9..54e4f1a4b8 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -1189,6 +1189,68 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsBlogs"); }); + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogFeature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .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("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeatureName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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.HasKey("Id"); + + b.ToTable("CmsBlogFeatures"); + }); + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => { b.Property("Id") From 1d06f06e372813c85ac769f4ac915d197dc4d3d5 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Tue, 16 Feb 2021 14:45:06 +0300 Subject: [PATCH 023/126] code refactoring - use single return statement. --- .../Volo/CmsKit/Public/Pages/PageAppService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs index 1e1d63bf71..481a773efc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs @@ -14,14 +14,15 @@ namespace Volo.CmsKit.Public.Pages public virtual async Task FindByUrlAsync(string url) { + PageDto pageDto = null; var page = await PageRepository.FindByUrlAsync(url); - if (page == null) + if (page !=null) { - return null; + pageDto = ObjectMapper.Map(page); } - return ObjectMapper.Map(page); + return pageDto; } } } \ No newline at end of file From b6aced7866aa2094244cb491842dc4bd084e18fa Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Tue, 16 Feb 2021 14:45:48 +0300 Subject: [PATCH 024/126] make Title and Url setters protected and expose Set method to handle validation. --- .../CmsKit/Admin/Pages/PageAdminAppService.cs | 4 +-- .../Volo/CmsKit/Pages/Page.cs | 32 ++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs index 3db45dac95..48a02eb6cf 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs @@ -66,8 +66,8 @@ namespace Volo.CmsKit.Admin.Pages await CheckPageUrlAsync(input.Url); } - page.Title = input.Title; - page.Url = input.Url; + page.SetTitle(input.Title); + page.SetUrl(input.Url); page.Description = input.Description; await PageRepository.UpdateAsync(page); diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs index 240fc629d6..dc22b8c002 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs @@ -8,26 +8,36 @@ namespace Volo.CmsKit.Pages { public class Page : FullAuditedAggregateRoot, IMultiTenant { - public Guid? TenantId { get; set; } + [CanBeNull] public virtual Guid? TenantId { get; set; } - public virtual string Title { get; set; } + [NotNull] public virtual string Title { get; protected set; } + + [NotNull] public virtual string Url { get; protected set; } + + [CanBeNull] public virtual string Description { get; set; } - public virtual string Url { get; set; } - - public virtual string Description { get; set; } - protected Page() { - } - public Page(Guid id, [NotNull] string title, [NotNull] string url, [CanBeNull] string description = null, Guid? tenantId = null) : base(id) + public Page(Guid id, [NotNull] string title, [NotNull] string url, [CanBeNull] string description = null, + Guid? tenantId = null) : base(id) { - Title = Check.NotNullOrWhiteSpace(title, nameof(title), PageConsts.MaxTitleLength); - Url = Check.NotNullOrWhiteSpace(url, nameof(url), PageConsts.MaxUrlLength); + Title = Check.NotNullOrEmpty(title, nameof(title), PageConsts.MaxTitleLength); + Url = Check.NotNullOrEmpty(url, nameof(url), PageConsts.MaxUrlLength); Description = Check.Length(description, nameof(description), PageConsts.MaxDescriptionLength); - + TenantId = tenantId; } + + public virtual void SetTitle(string title) + { + Title = Check.NotNullOrEmpty(title, nameof(title), PageConsts.MaxTitleLength); + } + + public virtual void SetUrl(string url) + { + Url = Check.NotNullOrEmpty(url, nameof(url), PageConsts.MaxUrlLength); + } } } \ No newline at end of file From 32588793191891dd139cb9c4fa55fb454a3e97bb Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 15:14:01 +0300 Subject: [PATCH 025/126] CmsKit - Remove BlogFeatureDataSeedContributor --- .../Blogs/BlogFeatureDataSeeContributor.cs | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureDataSeeContributor.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureDataSeeContributor.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureDataSeeContributor.cs deleted file mode 100644 index c3d8dcce53..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureDataSeeContributor.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.Data; - -namespace Volo.CmsKit.Blogs -{ - public class BlogFeatureDataSeeContributor : IDataSeedContributor - { - public Task SeedAsync(DataSeedContext context) - { - throw new NotImplementedException(); - } - } -} From 24853725630bc49cac35c215a10ce0a2f8932f03 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 15:14:18 +0300 Subject: [PATCH 026/126] CmsKit - Add IBlogFeatureManager --- .../Admin/Blogs/BlogFeatureAdminAppService.cs | 5 +-- .../Volo/CmsKit/Blogs/BlogFeatureManager.cs | 31 +++++++++++++++++++ .../Volo/CmsKit/Blogs/IBlogFeatureManager.cs | 15 +++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureManager.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index 1831023c19..8e600a3cbd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -13,6 +13,7 @@ namespace Volo.CmsKit.Admin.Blogs public class BlogFeatureAdminAppService : CmsKitAdminAppServiceBase, IBlogFeatureAdminAppService { protected IBlogFeatureRepository BlogFeatureRepository { get; } + protected IBlogFeatureManager BlogFeatureManager { get; } public BlogFeatureAdminAppService(IBlogFeatureRepository blogFeatureRepository) { @@ -22,9 +23,9 @@ namespace Volo.CmsKit.Admin.Blogs [Authorize(CmsKitAdminPermissions.Blogs.Features)] public async Task> GetListAsync(Guid blogId) { - var list = await BlogFeatureRepository.GetListAsync(blogId); + var blogFeatures = await BlogFeatureManager.GetListAsync(blogId); - return ObjectMapper.Map, List>(list); + return ObjectMapper.Map, List>(blogFeatures); } [Authorize(CmsKitAdminPermissions.Blogs.Features)] diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs new file mode 100644 index 0000000000..0c4d1c1d94 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; +using Volo.CmsKit.Blogs; + +namespace Volo.CmsKit.Blogs +{ + public class BlogFeatureManager : DomainService, IBlogFeatureManager + { + protected IBlogFeatureRepository BlogFeatureRepository { get; } + + public BlogFeatureManager(IBlogFeatureRepository blogFeatureRepository) + { + BlogFeatureRepository = blogFeatureRepository; + } + + public async Task> GetListAsync(Guid blogId) + { + var blogFeatures = await BlogFeatureRepository.GetListAsync(blogId); + + blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.CommentsFeatureName)); + blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.ReactionsFeatureName)); + blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.RatingsFeatureName)); + + return blogFeatures; + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureManager.cs new file mode 100644 index 0000000000..87e721a913 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureManager.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; +using Volo.CmsKit.Blogs; + +namespace Volo.CmsKit.Blogs +{ + public interface IBlogFeatureManager : IDomainService + { + Task> GetListAsync(Guid blogId); + } +} From c1f640dee01ce327af7f7100bc864a0b47a2dece Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 15:24:45 +0300 Subject: [PATCH 027/126] CmsKit - Add IBlogFeatureManager to ctor of AppService --- .../Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index 8e600a3cbd..d578d00c92 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -15,9 +15,12 @@ namespace Volo.CmsKit.Admin.Blogs protected IBlogFeatureRepository BlogFeatureRepository { get; } protected IBlogFeatureManager BlogFeatureManager { get; } - public BlogFeatureAdminAppService(IBlogFeatureRepository blogFeatureRepository) + public BlogFeatureAdminAppService( + IBlogFeatureRepository blogFeatureRepository, + IBlogFeatureManager blogFeatureManager) { BlogFeatureRepository = blogFeatureRepository; + BlogFeatureManager = blogFeatureManager; } [Authorize(CmsKitAdminPermissions.Blogs.Features)] From 2384e2c4558e1ab1b58176260715a7c61ef7f755 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 15:41:01 +0300 Subject: [PATCH 028/126] CmsKit - IEquatable implementation for BlogFeature --- .../Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs index eec8223d89..eba38d9c53 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs @@ -5,7 +5,7 @@ using Volo.Abp.Domain.Entities.Auditing; namespace Volo.CmsKit.Blogs { - public class BlogFeature : FullAuditedAggregateRoot + public class BlogFeature : FullAuditedAggregateRoot, IEquatable { protected BlogFeature() // Keep for ORM { @@ -23,5 +23,10 @@ namespace Volo.CmsKit.Blogs public string FeatureName { get; protected set; } public bool Enabled { get; set; } = true; + + public bool Equals(BlogFeature other) + { + return BlogId == other?.BlogId && FeatureName == other?.FeatureName; + } } } From 5381aa23b0472c063ce1265b8e6cbd6498b7d66c Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 15:50:40 +0300 Subject: [PATCH 029/126] CmsKit - Refactor BlogsFeature & Manager --- .../src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs | 4 ---- .../Volo/CmsKit/Blogs/BlogFeatureManager.cs | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs index eba38d9c53..a5c66f4119 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs @@ -7,10 +7,6 @@ namespace Volo.CmsKit.Blogs { public class BlogFeature : FullAuditedAggregateRoot, IEquatable { - protected BlogFeature() // Keep for ORM - { - } - public BlogFeature(Guid blogId, [NotNull] string featureName, bool enabled = true) { BlogId = blogId; diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs index 0c4d1c1d94..9393a5e488 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs @@ -21,6 +21,7 @@ namespace Volo.CmsKit.Blogs { var blogFeatures = await BlogFeatureRepository.GetListAsync(blogId); + // TODO: Move them IDefaultBlogFeatureProvider blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.CommentsFeatureName)); blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.ReactionsFeatureName)); blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.RatingsFeatureName)); From 6e32d5a0c4114aed12eb3251c89e0003cb011d96 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 15:51:16 +0300 Subject: [PATCH 030/126] CmsKit - Fix passing wrong BlogId from BlogPost Page --- .../Pages/CmsKit/Blogs/BlogPost.cshtml.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs index 7c3fb4fa64..fb7a8de563 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs @@ -46,17 +46,17 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Blogs if (GlobalFeatureManager.Instance.IsEnabled()) { - CommentsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.Id, BlogPostConsts.CommentsFeatureName); + CommentsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.BlogId, BlogPostConsts.CommentsFeatureName); } if (GlobalFeatureManager.Instance.IsEnabled()) { - ReactionsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.Id, BlogPostConsts.ReactionsFeatureName); + ReactionsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.BlogId, BlogPostConsts.ReactionsFeatureName); } if (GlobalFeatureManager.Instance.IsEnabled()) { - RatingsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.Id, BlogPostConsts.RatingsFeatureName); + RatingsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.BlogId, BlogPostConsts.RatingsFeatureName); } } } From 739db98e161cfa5413d303cacce1cd78849a01f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 16 Feb 2021 16:40:54 +0300 Subject: [PATCH 031/126] Resolved #7750: Re-registering custom repositories should also override the default repositories for the same entity. --- .../ServiceCollectionRepositoryExtensions.cs | 38 ++++++++++++++----- .../AbpRepositoryConventionalRegistrar.cs | 3 ++ .../Repositories/RepositoryRegistrarBase.cs | 2 +- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/framework/src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs b/framework/src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs index ac66f35864..60826a14dd 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs @@ -7,32 +7,36 @@ namespace Microsoft.Extensions.DependencyInjection { public static class ServiceCollectionRepositoryExtensions { - public static IServiceCollection AddDefaultRepository(this IServiceCollection services, Type entityType, Type repositoryImplementationType) + public static IServiceCollection AddDefaultRepository( + this IServiceCollection services, + Type entityType, + Type repositoryImplementationType, + bool replaceExisting = false) { //IReadOnlyBasicRepository var readOnlyBasicRepositoryInterface = typeof(IReadOnlyBasicRepository<>).MakeGenericType(entityType); if (readOnlyBasicRepositoryInterface.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(readOnlyBasicRepositoryInterface, repositoryImplementationType); + RegisterService(services, readOnlyBasicRepositoryInterface, repositoryImplementationType, replaceExisting); //IReadOnlyRepository var readOnlyRepositoryInterface = typeof(IReadOnlyRepository<>).MakeGenericType(entityType); if (readOnlyRepositoryInterface.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(readOnlyRepositoryInterface, repositoryImplementationType); + RegisterService(services, readOnlyRepositoryInterface, repositoryImplementationType, replaceExisting); } //IBasicRepository var basicRepositoryInterface = typeof(IBasicRepository<>).MakeGenericType(entityType); if (basicRepositoryInterface.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(basicRepositoryInterface, repositoryImplementationType); + RegisterService(services, basicRepositoryInterface, repositoryImplementationType, replaceExisting); //IRepository var repositoryInterface = typeof(IRepository<>).MakeGenericType(entityType); if (repositoryInterface.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(repositoryInterface, repositoryImplementationType); + RegisterService(services, repositoryInterface, repositoryImplementationType, replaceExisting); } } } @@ -44,26 +48,26 @@ namespace Microsoft.Extensions.DependencyInjection var readOnlyBasicRepositoryInterfaceWithPk = typeof(IReadOnlyBasicRepository<,>).MakeGenericType(entityType, primaryKeyType); if (readOnlyBasicRepositoryInterfaceWithPk.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(readOnlyBasicRepositoryInterfaceWithPk, repositoryImplementationType); + RegisterService(services, readOnlyBasicRepositoryInterfaceWithPk, repositoryImplementationType, replaceExisting); //IReadOnlyRepository var readOnlyRepositoryInterfaceWithPk = typeof(IReadOnlyRepository<,>).MakeGenericType(entityType, primaryKeyType); if (readOnlyRepositoryInterfaceWithPk.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(readOnlyRepositoryInterfaceWithPk, repositoryImplementationType); + RegisterService(services, readOnlyRepositoryInterfaceWithPk, repositoryImplementationType, replaceExisting); } //IBasicRepository var basicRepositoryInterfaceWithPk = typeof(IBasicRepository<,>).MakeGenericType(entityType, primaryKeyType); if (basicRepositoryInterfaceWithPk.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(basicRepositoryInterfaceWithPk, repositoryImplementationType); + RegisterService(services, basicRepositoryInterfaceWithPk, repositoryImplementationType, replaceExisting); //IRepository var repositoryInterfaceWithPk = typeof(IRepository<,>).MakeGenericType(entityType, primaryKeyType); if (repositoryInterfaceWithPk.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(repositoryInterfaceWithPk, repositoryImplementationType); + RegisterService(services, repositoryInterfaceWithPk, repositoryImplementationType, replaceExisting); } } } @@ -71,5 +75,21 @@ namespace Microsoft.Extensions.DependencyInjection return services; } + + private static void RegisterService( + IServiceCollection services, + Type serviceType, + Type implementationType, + bool replaceExisting) + { + if (replaceExisting) + { + services.Replace(ServiceDescriptor.Transient(serviceType, implementationType)); + } + else + { + services.TryAddTransient(serviceType, implementationType); + } + } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/AbpRepositoryConventionalRegistrar.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/AbpRepositoryConventionalRegistrar.cs index f11812f2ea..f7b9527aa0 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/AbpRepositoryConventionalRegistrar.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/AbpRepositoryConventionalRegistrar.cs @@ -6,6 +6,9 @@ using Volo.Abp.DependencyInjection; namespace Volo.Abp.Domain.Repositories { + /* Repositories are not injected by class by default. + * This class specializes repository registration to apply this rule. + */ public class AbpRepositoryConventionalRegistrar : DefaultConventionalRegistrar { public static bool ExposeRepositoryClasses { get; set; } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs index f3b2fc388f..548a636eff 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.Domain.Repositories { foreach (var customRepository in Options.CustomRepositories) { - Options.Services.AddDefaultRepository(customRepository.Key, customRepository.Value); + Options.Services.AddDefaultRepository(customRepository.Key, customRepository.Value, replaceExisting: true); } if (Options.RegisterDefaultRepositories) From b7e106a6d59ffe48b532e885649187ec8d3ca30e Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 16:45:50 +0300 Subject: [PATCH 032/126] CmsKit - Move Default BlogFeatures to IDefaultBlogFeatureProvider --- .../Volo/CmsKit/Blogs/BlogPostConsts.cs | 12 ++++++---- .../Volo/CmsKit/Blogs/BlogFeatureManager.cs | 17 +++++++------- .../DefaultDefaultBlogFeatureProvider.cs | 23 +++++++++++++++++++ .../Blogs/IDefaultBlogFeatureProvider.cs | 14 +++++++++++ 4 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultDefaultBlogFeatureProvider.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IDefaultBlogFeatureProvider.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostConsts.cs index 2acd2cdeba..7d24f76d09 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostConsts.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogPostConsts.cs @@ -1,4 +1,6 @@ -namespace Volo.CmsKit.Blogs +using Volo.CmsKit.GlobalFeatures; + +namespace Volo.CmsKit.Blogs { public static class BlogPostConsts { @@ -12,10 +14,12 @@ public const string EntityType = "BlogPost"; - public const string CommentsFeatureName = "Comments"; + public const string CommentsFeatureName = CommentsFeature.Name; + + public const string ReactionsFeatureName = ReactionsFeature.Name; - public const string ReactionsFeatureName = "Reactions"; + public const string RatingsFeatureName = RatingsFeature.Name; - public const string RatingsFeatureName = "Ratings"; + public const string TagsFeatureName = TagsFeature.Name; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs index 9393a5e488..c1ccb0f16f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs @@ -1,10 +1,7 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Volo.Abp.Domain.Services; -using Volo.CmsKit.Blogs; namespace Volo.CmsKit.Blogs { @@ -12,19 +9,23 @@ namespace Volo.CmsKit.Blogs { protected IBlogFeatureRepository BlogFeatureRepository { get; } - public BlogFeatureManager(IBlogFeatureRepository blogFeatureRepository) + protected IDefaultBlogFeatureProvider DefaultBlogFeatureProvider { get; } + + public BlogFeatureManager( + IBlogFeatureRepository blogFeatureRepository, + IDefaultBlogFeatureProvider defaultBlogFeatureProvider) { BlogFeatureRepository = blogFeatureRepository; + DefaultBlogFeatureProvider = defaultBlogFeatureProvider; } public async Task> GetListAsync(Guid blogId) { var blogFeatures = await BlogFeatureRepository.GetListAsync(blogId); - // TODO: Move them IDefaultBlogFeatureProvider - blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.CommentsFeatureName)); - blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.ReactionsFeatureName)); - blogFeatures.AddIfNotContains(new BlogFeature(blogId, BlogPostConsts.RatingsFeatureName)); + var defaultFeatures = await DefaultBlogFeatureProvider.GetDefaultFeaturesAsync(blogId); + + defaultFeatures.ForEach(x => blogFeatures.AddIfNotContains(x)); return blogFeatures; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultDefaultBlogFeatureProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultDefaultBlogFeatureProvider.cs new file mode 100644 index 0000000000..f9b2d36800 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultDefaultBlogFeatureProvider.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.CmsKit.Blogs +{ + public class DefaultDefaultBlogFeatureProvider : IDefaultBlogFeatureProvider, ITransientDependency + { + public Task> GetDefaultFeaturesAsync(Guid blogId) + { + return Task.FromResult(new List + { + new BlogFeature(blogId, BlogPostConsts.CommentsFeatureName), + new BlogFeature(blogId, BlogPostConsts.ReactionsFeatureName), + new BlogFeature(blogId, BlogPostConsts.RatingsFeatureName), + new BlogFeature(blogId, BlogPostConsts.RatingsFeatureName), + }); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IDefaultBlogFeatureProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IDefaultBlogFeatureProvider.cs new file mode 100644 index 0000000000..51234e3cbd --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IDefaultBlogFeatureProvider.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Blogs; + +namespace Volo.CmsKit.Blogs +{ + public interface IDefaultBlogFeatureProvider + { + Task> GetDefaultFeaturesAsync(Guid blogId); + } +} From cb0afcbe27a8c3a5e725a05ca88fb6335f02448d Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 16 Feb 2021 16:57:15 +0300 Subject: [PATCH 033/126] Added CommentAdminAppService dtos --- .../Volo/CmsKit/Admin/Comments/CommentDto.cs | 21 +++++++++++++++ .../Admin/Comments/CommentGetListInput.cs | 22 +++++++++++++++ .../Admin/Comments/CommentWithDetailsDto.cs | 27 +++++++++++++++++++ .../Admin/Comments/ICommentAdminAppService.cs | 15 +++++++++++ 4 files changed, 85 insertions(+) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithDetailsDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentDto.cs new file mode 100644 index 0000000000..bf43a1e50a --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentDto.cs @@ -0,0 +1,21 @@ +using System; + +namespace Volo.CmsKit.Admin.Comments +{ + public class CommentDto + { + public Guid Id { get; set; } + + public string EntityType { get; set; } + + public string EntityId { get; set; } + + public string Text { get; set; } + + public Guid? RepliedCommentId { get; set; } + + public Guid CreatorId { get; set; } + + public DateTime CreationTime { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs new file mode 100644 index 0000000000..2113f93e99 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs @@ -0,0 +1,22 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Admin.Comments +{ + public class CommentGetListInput : PagedAndSortedResultRequestDto + { + public string EntityType { get; set; } + + public string EntityId { get; set; } + + public string Text { get; set; } + + public Guid? RepliedCommentId { get; set; } + + public Guid CreatorId { get; set; } + + public DateTime CreationStartDate { get; set; } + + public DateTime CreationEndDate { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithDetailsDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithDetailsDto.cs new file mode 100644 index 0000000000..451b30ba86 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithDetailsDto.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using Volo.CmsKit.Users; + +namespace Volo.CmsKit.Admin.Comments +{ + public class CommentWithDetailsDto + { + public Guid Id { get; set; } + + public string EntityType { get; set; } + + public string EntityId { get; set; } + + public string Text { get; set; } + + public Guid? RepliedCommentId { get; set; } + + public Guid CreatorId { get; set; } + + public DateTime CreationTime { get; set; } + + public List Replies { get; set; } + + public CmsUserDto Author { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs new file mode 100644 index 0000000000..54b07c6f0a --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs @@ -0,0 +1,15 @@ +using System.Linq.Dynamic.Core; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Volo.CmsKit.Admin.Comments +{ + public interface ICommentAdminAppService : IApplicationService + { + Task> GetListAsync(CommentGetListInput input); + + Task GetAsync(string entityType, string entityId); + + Task DeleteAsync(string entityType, string entityId); + } +} \ No newline at end of file From 1843bae87137ebf3c1f50d58c12d2d39248793ff Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 16 Feb 2021 18:00:12 +0300 Subject: [PATCH 034/126] Added get comment to CommentAdminAppService --- .../Volo/CmsKit/Admin/Comments/CmsUserDto.cs | 15 +++++++ ...hDetailsDto.cs => CommentWithAuthorDto.cs} | 4 +- .../Admin/Comments/ICommentAdminAppService.cs | 7 ++-- ...CmsKitAdminApplicationAutoMapperProfile.cs | 11 ++++- .../Admin/Comments/CommentAdminAppService.cs | 40 +++++++++++++++++++ .../CmsKit/Comments/ICommentRepository.cs | 2 + .../Comments/EfCoreCommentRepository.cs | 22 ++++++++++ .../Comments/MongoCommentRepository.cs | 22 ++++++++++ 8 files changed, 116 insertions(+), 7 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CmsUserDto.cs rename modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/{CommentWithDetailsDto.cs => CommentWithAuthorDto.cs} (84%) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CmsUserDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CmsUserDto.cs new file mode 100644 index 0000000000..90eb3d7fb2 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CmsUserDto.cs @@ -0,0 +1,15 @@ +using System; + +namespace Volo.CmsKit.Admin.Comments +{ + public class CmsUserDto + { + public Guid Id { get; set; } + + public string UserName { get; set; } + + public string Name { get; set; } + + public string Surname { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithDetailsDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithAuthorDto.cs similarity index 84% rename from modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithDetailsDto.cs rename to modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithAuthorDto.cs index 451b30ba86..833a52180b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithDetailsDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentWithAuthorDto.cs @@ -4,7 +4,7 @@ using Volo.CmsKit.Users; namespace Volo.CmsKit.Admin.Comments { - public class CommentWithDetailsDto + public class CommentWithAuthorDto { public Guid Id { get; set; } @@ -20,8 +20,6 @@ namespace Volo.CmsKit.Admin.Comments public DateTime CreationTime { get; set; } - public List Replies { get; set; } - public CmsUserDto Author { get; set; } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs index 54b07c6f0a..48fbd2d108 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs @@ -1,4 +1,5 @@ -using System.Linq.Dynamic.Core; +using System; +using System.Linq.Dynamic.Core; using System.Threading.Tasks; using Volo.Abp.Application.Services; @@ -8,8 +9,8 @@ namespace Volo.CmsKit.Admin.Comments { Task> GetListAsync(CommentGetListInput input); - Task GetAsync(string entityType, string entityId); + Task GetAsync(Guid id); - Task DeleteAsync(string entityType, string entityId); + Task DeleteAsync(Guid id); } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 33a9d9de84..f5624c5046 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -1,14 +1,18 @@ using AutoMapper; +using Volo.Abp.AutoMapper; using Volo.CmsKit.Admin.Blogs; +using Volo.CmsKit.Admin.Comments; using Volo.CmsKit.Admin.Contents; using Volo.CmsKit.Admin.MediaDescriptors; using Volo.CmsKit.Admin.Pages; using Volo.CmsKit.Blogs; using Volo.CmsKit.Admin.Tags; +using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; using Volo.CmsKit.MediaDescriptors; using Volo.CmsKit.Pages; using Volo.CmsKit.Tags; +using Volo.CmsKit.Users; namespace Volo.CmsKit.Admin { @@ -16,6 +20,12 @@ namespace Volo.CmsKit.Admin { public CmsKitAdminApplicationAutoMapperProfile() { + CreateMap(); + + CreateMap(); + CreateMap() + .Ignore(x=> x.Author); + CreateMap(); CreateMap(MemberList.Destination); @@ -24,7 +34,6 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Source); CreateMap(MemberList.Destination); - CreateMap(MemberList.Source); CreateMap(MemberList.Destination) .ReverseMap(); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs new file mode 100644 index 0000000000..44c763cd7c --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -0,0 +1,40 @@ +using System; +using System.Linq.Dynamic.Core; +using System.Threading.Tasks; +using Volo.CmsKit.Comments; +using Volo.CmsKit.Users; + +namespace Volo.CmsKit.Admin.Comments +{ + public class CommentAdminAppService : CmsKitAdminAppServiceBase, ICommentAdminAppService + { + protected readonly ICommentRepository CommentRepository; + + public CommentAdminAppService(ICommentRepository commentRepository) + { + CommentRepository = commentRepository; + } + + public virtual Task> GetListAsync(CommentGetListInput input) + { + throw new System.NotImplementedException(); + } + + public virtual async Task GetAsync(Guid id) + { + var comment = await CommentRepository.GetWithAuthorAsync(id); + + var dto = ObjectMapper.Map(comment.Comment); + dto.Author = ObjectMapper.Map(comment.Author); + + return dto; + } + + public virtual async Task DeleteAsync(Guid id) + { + var comment = await CommentRepository.GetAsync(id); + + await CommentRepository.DeleteWithRepliesAsync(comment); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs index 0c61a22f02..523b03dd2f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs @@ -9,6 +9,8 @@ namespace Volo.CmsKit.Comments { public interface ICommentRepository : IBasicRepository { + Task GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default); + Task> GetListWithAuthorsAsync( [NotNull] string entityType, [NotNull] string entityId, diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs index 40496aaef8..725aa64e89 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs @@ -5,6 +5,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Volo.Abp; +using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -20,6 +21,27 @@ namespace Volo.CmsKit.Comments { } + public async Task GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default) + { + var query = from comment in (await GetDbSetAsync()) + join user in (await GetDbContextAsync()).Set() on comment.CreatorId equals user.Id + where id == comment.Id + select new CommentWithAuthorQueryResultItem + { + Comment = comment, + Author = user + }; + + var commentWithAuthor = await query.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + + if (commentWithAuthor == null) + { + throw new EntityNotFoundException(typeof(Comment), id); + } + + return commentWithAuthor; + } + public async Task> GetListWithAuthorsAsync( string entityType, string entityId, diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index 5d16c6d55c..7e6a434c3f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using MongoDB.Driver.Linq; using MongoDB.Driver; using Volo.Abp; +using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; @@ -18,6 +19,27 @@ namespace Volo.CmsKit.MongoDB.Comments { } + public async Task GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default) + { + var query = from comment in (await GetMongoQueryableAsync(cancellationToken)) + join user in (await GetDbContextAsync(cancellationToken)).CmsUsers on comment.CreatorId equals user.Id + where id == comment.Id + select new CommentWithAuthorQueryResultItem + { + Comment = comment, + Author = user + }; + + var commentWithAuthor = await query.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + + if (commentWithAuthor == null) + { + throw new EntityNotFoundException(typeof(Comment), id); + } + + return commentWithAuthor; + } + public async Task> GetListWithAuthorsAsync( string entityType, string entityId, From 4630a4c91f9d1ce47625e8af43dfe99fb54c4716 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 16 Feb 2021 18:19:55 +0300 Subject: [PATCH 035/126] CmsKit - Update BlogFeature tests --- .../Blogs/BlogFeatureAdminAppService_Test.cs | 2 +- modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs index 41792902c4..bc310ca681 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs @@ -61,7 +61,7 @@ namespace Volo.CmsKit.Blogs result.ShouldNotBeNull(); result.ShouldNotBeEmpty(); - result.Count.ShouldBe(2); + result.Count.ShouldBeGreaterThan(2); // 2 are seeded and there are built-in Features. } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs index 7c72bf68cb..e062ac6c93 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs @@ -93,13 +93,13 @@ namespace Volo.CmsKit public Guid BlogFeature_1_Id { get; internal set; } = Guid.NewGuid(); - public string BlogFeature_1_FeatureName => "Tagging"; + public string BlogFeature_1_FeatureName => "Analytics"; public bool BlogFeature_1_Enabled => true; public Guid BlogFeature_2_Id { get; internal set; } = Guid.NewGuid(); - public string BlogFeature_2_FeatureName => "Rating"; + public string BlogFeature_2_FeatureName => "Hotjar"; public bool BlogFeature_2_Enabled => false; From 681414dcd744143bc04ed5caa3d7e67c5a540d4f Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 16 Feb 2021 18:37:39 +0300 Subject: [PATCH 036/126] Added getlist to comment appservice and repositories --- .../Admin/Comments/CommentGetListInput.cs | 2 + .../Admin/Comments/ICommentAdminAppService.cs | 4 +- .../Admin/Comments/CommentAdminAppService.cs | 30 ++++++- .../CmsKit/Comments/ICommentRepository.cs | 25 ++++++ .../Comments/EfCoreCommentRepository.cs | 72 +++++++++++++++++ .../Comments/MongoCommentRepository.cs | 79 ++++++++++++++++++- 6 files changed, 207 insertions(+), 5 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs index 2113f93e99..69462870ff 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs @@ -5,6 +5,8 @@ namespace Volo.CmsKit.Admin.Comments { public class CommentGetListInput : PagedAndSortedResultRequestDto { + public string Filter { get; set; } + public string EntityType { get; set; } public string EntityId { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs index 48fbd2d108..d6903c0cc5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs @@ -1,13 +1,13 @@ using System; -using System.Linq.Dynamic.Core; using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; namespace Volo.CmsKit.Admin.Comments { public interface ICommentAdminAppService : IApplicationService { - Task> GetListAsync(CommentGetListInput input); + Task> GetListAsync(CommentGetListInput input); Task GetAsync(Guid id); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs index 44c763cd7c..a8e8faf6a2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Linq.Dynamic.Core; using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; using Volo.CmsKit.Comments; using Volo.CmsKit.Users; @@ -15,9 +17,33 @@ namespace Volo.CmsKit.Admin.Comments CommentRepository = commentRepository; } - public virtual Task> GetListAsync(CommentGetListInput input) + public virtual async Task> GetListAsync(CommentGetListInput input) { - throw new System.NotImplementedException(); + var totalCount = await CommentRepository.GetCountAsync( + input.Filter, + input.EntityType, + input.EntityId, + input.RepliedCommentId, + input.CreatorId, + input.CreationStartDate, + input.CreationEndDate); + + var comments = await CommentRepository.GetListAsync( + input.Filter, + input.EntityType, + input.EntityId, + input.RepliedCommentId, + input.CreatorId, + input.CreationStartDate, + input.CreationEndDate, + input.Sorting, + input.MaxResultCount, + input.SkipCount + ); + + var dtos = ObjectMapper.Map, List>(comments); + + return new PagedResultDto(totalCount, dtos); } public virtual async Task GetAsync(Guid id) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs index 523b03dd2f..7ea61d47bf 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs @@ -10,6 +10,31 @@ namespace Volo.CmsKit.Comments public interface ICommentRepository : IBasicRepository { Task GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default); + + Task> GetListAsync( + string filter = null, + string entityType = null, + string entityId = null, + Guid? repliedCommentId = null, + Guid? creatorId = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null, + string sorting = null, + int maxResultCount = int.MaxValue, + int skipCount = 0, + CancellationToken cancellationToken = default + ); + + Task GetCountAsync( + string filter = null, + string entityType = null, + string entityId = null, + Guid? repliedCommentId = null, + Guid? creatorId = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null, + CancellationToken cancellationToken = default + ); Task> GetListWithAuthorsAsync( [NotNull] string entityType, diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs index 725aa64e89..95781ae496 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; @@ -42,6 +43,57 @@ namespace Volo.CmsKit.Comments return commentWithAuthor; } + public async Task> GetListAsync( + string filter = null, + string entityType = null, + string entityId = null, + Guid? repliedCommentId = null, + Guid? creatorId = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null, + string sorting = null, + int maxResultCount = int.MaxValue, + int skipCount = 0, + CancellationToken cancellationToken = default + ) + { + var query = await GetListQueryAsync( + filter, + entityType, + entityId, + repliedCommentId, + creatorId, + creationStartDate, + creationEndDate); + + return await query.OrderBy(sorting ?? "creationTime desc") + .PageBy(skipCount, maxResultCount) + .ToListAsync(GetCancellationToken(cancellationToken)); + } + + public async Task GetCountAsync( + string filter = null, + string entityType = null, + string entityId = null, + Guid? repliedCommentId = null, + Guid? creatorId = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null, + CancellationToken cancellationToken = default + ) + { + var query = await GetListQueryAsync( + filter, + entityType, + entityId, + repliedCommentId, + creatorId, + creationStartDate, + creationEndDate); + + return await query.LongCountAsync(GetCancellationToken(cancellationToken)); + } + public async Task> GetListWithAuthorsAsync( string entityType, string entityId, @@ -81,5 +133,25 @@ namespace Volo.CmsKit.Comments await DeleteAsync(comment, cancellationToken: GetCancellationToken(cancellationToken)); } + + protected virtual async Task> GetListQueryAsync( + string filter = null, + string entityType = null, + string entityId = null, + Guid? repliedCommentId = null, + Guid? creatorId = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null + ) + { + return (await GetDbSetAsync()) + .WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Text.Contains(filter)) + .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.EntityType == entityType) + .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.EntityId == entityId) + .WhereIf(repliedCommentId.HasValue, c => c.RepliedCommentId == repliedCommentId) + .WhereIf(creatorId.HasValue, c => c.CreatorId == creatorId) + .WhereIf(creationStartDate.HasValue, c => c.CreationTime >= creationStartDate) + .WhereIf(creationEndDate.HasValue, c => c.CreationTime <= creationEndDate); + } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index 7e6a434c3f..78d727b57c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; -using MongoDB.Driver.Linq; using MongoDB.Driver; +using MongoDB.Driver.Linq; using Volo.Abp; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories.MongoDB; @@ -40,6 +41,61 @@ namespace Volo.CmsKit.MongoDB.Comments return commentWithAuthor; } + public async Task> GetListAsync( + string filter = null, + string entityType = null, + string entityId = null, + Guid? repliedCommentId = null, + Guid? creatorId = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null, + string sorting = null, + int maxResultCount = int.MaxValue, + int skipCount = 0, + CancellationToken cancellationToken = default + ) + { + var query = await GetListQueryAsync( + filter, + entityType, + entityId, + repliedCommentId, + creatorId, + creationStartDate, + creationEndDate, + cancellationToken); + + return await query.OrderBy(sorting ?? "creationTime desc") + .As>() + .PageBy>(skipCount, maxResultCount) + .ToListAsync(GetCancellationToken(cancellationToken)); + } + + public async Task GetCountAsync( + string filter = null, + string entityType = null, + string entityId = null, + Guid? repliedCommentId = null, + Guid? creatorId = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null, + CancellationToken cancellationToken = default + ) + { + var query = await GetListQueryAsync( + filter, + entityType, + entityId, + repliedCommentId, + creatorId, + creationStartDate, + creationEndDate, + cancellationToken); + + return await query.As>() + .LongCountAsync(GetCancellationToken(cancellationToken)); + } + public async Task> GetListWithAuthorsAsync( string entityType, string entityId, @@ -92,5 +148,26 @@ namespace Volo.CmsKit.MongoDB.Comments cancellationToken: GetCancellationToken(cancellationToken) ); } + + protected virtual async Task> GetListQueryAsync( + string filter = null, + string entityType = null, + string entityId = null, + Guid? repliedCommentId = null, + Guid? creatorId = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null, + CancellationToken cancellationToken = default + ) + { + return (await GetMongoQueryableAsync(cancellationToken)) + .WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Text.Contains(filter)) + .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.EntityType == entityType) + .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.EntityId == entityId) + .WhereIf(repliedCommentId.HasValue, c => c.RepliedCommentId == repliedCommentId) + .WhereIf(creatorId.HasValue, c => c.CreatorId == creatorId) + .WhereIf(creationStartDate.HasValue, c => c.CreationTime >= creationStartDate) + .WhereIf(creationEndDate.HasValue, c => c.CreationTime <= creationEndDate); + } } } From 48e3f6d78a35404704ed0e8655c0d1193c42b052 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 10:21:40 +0300 Subject: [PATCH 037/126] CmsKit - Remove BlogLookupDto --- .../Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs | 10 ---------- .../Admin/CmsKitAdminApplicationAutoMapperProfile.cs | 2 -- 2 files changed, 12 deletions(-) delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs deleted file mode 100644 index ed514d839d..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace Volo.CmsKit.Admin.Blogs -{ - public class BlogLookupDto - { - public Guid Id { get; set; } - public string Name { get; set; } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 173897f0a4..5a9401c910 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -30,8 +30,6 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Destination) .ReverseMap(); - CreateMap(MemberList.Destination); - CreateMap(MemberList.Destination); CreateMap(); From 47549c9a7465b918e97ae6f524a7e313cc211e0f Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 11:52:19 +0300 Subject: [PATCH 038/126] domain object refactoring --- .../Volo/CmsKit/Contents/Content.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs index e2d4a2a4ac..434ae4847b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs @@ -8,12 +8,16 @@ namespace Volo.CmsKit.Contents { public class Content : FullAuditedAggregateRoot, IMultiTenant { + [CanBeNull] public virtual Guid? TenantId { get; protected set; } + [NotNull] public virtual string EntityType { get; protected set; } - public virtual string EntityId { get; set; } + [NotNull] + public virtual string EntityId { get; protected set; } + [NotNull] public virtual string Value { get; protected set; } protected Content() @@ -23,16 +27,22 @@ namespace Volo.CmsKit.Contents public Content(Guid id, [NotNull] string entityType, [NotNull] string entityId, [NotNull] string value, Guid? tenantId = null) : base(id) { - EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); - SetValue(value); + EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); + Value = Check.NotNullOrEmpty(value, nameof(value), ContentConsts.MaxValueLength); TenantId = tenantId; } public void SetValue([NotNull] string value) { - Value = Check.NotNullOrWhiteSpace(value, nameof(value), ContentConsts.MaxValueLength); + Value = Check.NotNullOrEmpty(value, nameof(value), ContentConsts.MaxValueLength); + } + + public void SetEntity([NotNull] string entityType, [NotNull] string entityId) + { + EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); + EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); } } } From d02412d2ccb8133519939629b0472239607ff8ee Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 11:52:34 +0300 Subject: [PATCH 039/126] pass cancellation token --- .../Volo/CmsKit/Contents/ContentManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs index 047d923ad6..4ca9554289 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs @@ -20,12 +20,13 @@ namespace Volo.CmsKit.Contents public async Task InsertAsync(Content content, CancellationToken cancellationToken = default) { - if (await ContentRepository.ExistsAsync(content.EntityType, content.EntityId, content.TenantId, cancellationToken)) + if (await ContentRepository.ExistsAsync(content.EntityType, content.EntityId, content.TenantId, + cancellationToken)) { throw new ContentAlreadyExistException(content.EntityType, content.EntityId); } - return await ContentRepository.InsertAsync(content); + return await ContentRepository.InsertAsync(content, cancellationToken: cancellationToken); } } -} +} \ No newline at end of file From 027305ec824d48813f50abc58b67f0309bcb6aca Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 11:52:45 +0300 Subject: [PATCH 040/126] app service renaming --- .../{ContentAppService.cs => ContentPublicAppService.cs} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/{ContentAppService.cs => ContentPublicAppService.cs} (78%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs similarity index 78% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs index 94cffea154..f00f2bdb2d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs @@ -3,11 +3,11 @@ using Volo.CmsKit.Contents; namespace Volo.CmsKit.Public.Contents { - public class ContentAppService : CmsKitAppServiceBase, IContentAppService + public class ContentPublicAppService : CmsKitAppServiceBase, IContentAppService { protected readonly IContentRepository ContentRepository; - public ContentAppService(IContentRepository contentRepository) + public ContentPublicAppService(IContentRepository contentRepository) { ContentRepository = contentRepository; } From 2e5b6c319af94b303af667857e5e39825953d7e5 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 11:52:59 +0300 Subject: [PATCH 041/126] app service renaming --- .../Pages/{PageAppService.cs => PagePublicAppService.cs} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/{PageAppService.cs => PagePublicAppService.cs} (78%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs similarity index 78% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs index 1e1d63bf71..bb2d1c5a70 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs @@ -3,11 +3,11 @@ using Volo.CmsKit.Pages; namespace Volo.CmsKit.Public.Pages { - public class PageAppService : CmsKitPublicAppServiceBase, IPageAppService + public class PagePublicAppService : CmsKitPublicAppServiceBase, IPageAppService { protected readonly IPageRepository PageRepository; - public PageAppService(IPageRepository pageRepository) + public PagePublicAppService(IPageRepository pageRepository) { PageRepository = pageRepository; } From 5accac6a1c6f74de7cbe62d8bfaa109cada50f42 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 17 Feb 2021 17:11:49 +0800 Subject: [PATCH 042/126] Add IgnoreMultiTenancy to AbpIdentityServerMongoDbContext. --- .../IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs | 2 ++ .../IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs | 2 ++ 2 files changed, 4 insertions(+) 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 eddf19cd29..49341771ca 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 @@ -7,9 +7,11 @@ using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.MongoDB; +using Volo.Abp.MultiTenancy; namespace Volo.Abp.IdentityServer.MongoDB { + [IgnoreMultiTenancy] [ConnectionStringName(AbpIdentityServerDbProperties.ConnectionStringName)] public class AbpIdentityServerMongoDbContext : AbpMongoDbContext, IAbpIdentityServerMongoDbContext { 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 5b521f2600..ad9c90b62c 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 @@ -7,9 +7,11 @@ using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.MongoDB; +using Volo.Abp.MultiTenancy; namespace Volo.Abp.IdentityServer.MongoDB { + [IgnoreMultiTenancy] [ConnectionStringName(AbpIdentityServerDbProperties.ConnectionStringName)] public interface IAbpIdentityServerMongoDbContext : IAbpMongoDbContext { From e109fd926068c86f4703ba75998cfd496dce5c07 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Wed, 17 Feb 2021 12:20:31 +0300 Subject: [PATCH 043/126] Added comment admin app service test --- .../Admin/Comments/CommentGetListInput.cs | 6 +-- .../Comments/CommentAdminAppService_Tests.cs | 49 +++++++++++++++++++ .../Comments/CommentRepository_Tests.cs | 25 ++++++++++ 3 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs index 69462870ff..88e8d459b1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs @@ -15,10 +15,10 @@ namespace Volo.CmsKit.Admin.Comments public Guid? RepliedCommentId { get; set; } - public Guid CreatorId { get; set; } + public Guid? CreatorId { get; set; } - public DateTime CreationStartDate { get; set; } + public DateTime? CreationStartDate { get; set; } - public DateTime CreationEndDate { get; set; } + public DateTime? CreationEndDate { get; set; } } } \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs new file mode 100644 index 0000000000..e42312a97b --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs @@ -0,0 +1,49 @@ +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Domain.Entities; +using Volo.CmsKit.Admin.Comments; +using Xunit; + +namespace Volo.CmsKit.Comments +{ + public class CommentAdminAppService_Tests : CmsKitApplicationTestBase + { + private readonly ICommentAdminAppService _commentAdminAppService; + private readonly CmsKitTestData _cmsKitTestData; + + public CommentAdminAppService_Tests() + { + _commentAdminAppService = GetRequiredService(); + _cmsKitTestData = GetRequiredService(); + } + + [Fact] + public async Task ShouldGet_PagedListAsync() + { + var comments = await _commentAdminAppService.GetListAsync(new CommentGetListInput + { + MaxResultCount = 3 + }); + + comments.TotalCount.ShouldBe(6); + comments.Items.Count.ShouldBe(3); + } + + [Fact] + public async Task ShouldGet_CommentWithAuthorAsync() + { + var comment = await _commentAdminAppService.GetAsync(_cmsKitTestData.CommentWithChildId); + + comment.ShouldNotBeNull(); + comment.Author.ShouldNotBeNull(); + } + + [Fact] + public async Task ShouldDelete_WithRepliesAsync() + { + await _commentAdminAppService.DeleteAsync(_cmsKitTestData.CommentWithChildId); + + await Should.ThrowAsync(async () => await _commentAdminAppService.GetAsync(_cmsKitTestData.CommentWithChildId)); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs index 80b3052798..e7b36a242a 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs @@ -18,6 +18,31 @@ namespace Volo.CmsKit.Comments _commentRepository = GetRequiredService(); } + [Fact] + public async Task GetList_ShouldWork() + { + var comments = await _commentRepository.GetListAsync(); + + comments.ShouldNotBeNull(); + comments.Count.ShouldBe(6); + + var headCommentId = comments.First(x => x.RepliedCommentId != null).RepliedCommentId; + + var replies = await _commentRepository.GetListAsync(repliedCommentId: headCommentId); + + replies.ShouldNotBeNull(); + replies.Count.ShouldBeLessThan(6); + replies.Count.ShouldBeGreaterThanOrEqualTo(1); + } + + [Fact] + public async Task GetCount_ShouldWork() + { + var commentsCount = await _commentRepository.GetCountAsync(); + + commentsCount.ShouldBe(6); + } + [Fact] public async Task GetListWithAuthorsAsync() { From cc69bba8a0a8fde8f41ea96a435c6929d747cdd1 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Wed, 17 Feb 2021 12:24:42 +0300 Subject: [PATCH 044/126] Added comment admin permissions --- .../Permissions/CmsKitAdminPermissionDefinitionProvider.cs | 7 +++++++ .../Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs | 6 ++++++ .../Volo/CmsKit/Localization/Resources/en.json | 2 ++ 3 files changed, 15 insertions(+) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs index a5a30a60ef..4b6b0b38de 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs @@ -13,6 +13,12 @@ namespace Volo.CmsKit.Permissions { var cmsGroup = context.GetGroupOrNull(CmsKitAdminPermissions.GroupName) ?? context.AddGroup(CmsKitAdminPermissions.GroupName, L("Permission:CmsKit")); + if (GlobalFeatureManager.Instance.IsEnabled()) + { + var contentGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Comments.Default, L("Permission:Comments")); + contentGroup.AddChild(CmsKitAdminPermissions.Comments.Delete, L("Permission:Comments.Delete")); + } + if (GlobalFeatureManager.Instance.IsEnabled()) { var contentGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Contents.Default, L("Permission:Contents")); @@ -20,6 +26,7 @@ namespace Volo.CmsKit.Permissions contentGroup.AddChild(CmsKitAdminPermissions.Contents.Update, L("Permission:Contents.Update")); contentGroup.AddChild(CmsKitAdminPermissions.Contents.Delete, L("Permission:Contents.Delete")); } + if (GlobalFeatureManager.Instance.IsEnabled()) { var tagGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Tags.Default, L("Permission:TagManagement")); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs index 4c106d4d3c..4efa6c059c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs @@ -6,6 +6,12 @@ namespace Volo.CmsKit.Permissions { public const string GroupName = "CmsKit"; + public static class Comments + { + public const string Default = GroupName + ".Comments"; + public const string Delete = Default + ".Delete"; + } + public static class Tags { public const string Default = GroupName + ".Tags"; diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json index 7b7dd69308..9f481f94b0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json @@ -17,6 +17,8 @@ "Menu:CMS": "CMS", "MessageDeletionConfirmationMessage": "This comment will be deleted completely.", "Permission:CmsKit": "CmsKit", + "Permission:Comments": "Comment Management", + "Permission:Comments.Delete": "Delete", "Permission:Contents": "Content Management", "Permission:Contents.Create": "Create Content", "Permission:Contents.Delete": "Delete Content", From 90601d74e678bb92a1355c45bb6ccb05542c9c12 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Wed, 17 Feb 2021 12:30:21 +0300 Subject: [PATCH 045/126] Added comment admin controller --- .../Admin/Comments/CommentAdminAppService.cs | 8 +++- .../Admin/Comments/CommentAdminController.cs | 48 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs index a8e8faf6a2..12ac3b247e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -1,13 +1,18 @@ using System; using System.Collections.Generic; -using System.Linq.Dynamic.Core; using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; +using Volo.Abp.GlobalFeatures; using Volo.CmsKit.Comments; +using Volo.CmsKit.GlobalFeatures; +using Volo.CmsKit.Permissions; using Volo.CmsKit.Users; namespace Volo.CmsKit.Admin.Comments { + [RequiresGlobalFeature(typeof(CommentsFeature))] + [Authorize(CmsKitAdminPermissions.Comments.Default)] public class CommentAdminAppService : CmsKitAdminAppServiceBase, ICommentAdminAppService { protected readonly ICommentRepository CommentRepository; @@ -56,6 +61,7 @@ namespace Volo.CmsKit.Admin.Comments return dto; } + [Authorize(CmsKitAdminPermissions.Comments.Delete)] public virtual async Task DeleteAsync(Guid id) { var comment = await CommentRepository.GetAsync(id); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs new file mode 100644 index 0000000000..8d25f93b32 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs @@ -0,0 +1,48 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.GlobalFeatures; +using Volo.CmsKit.GlobalFeatures; +using Volo.CmsKit.Permissions; + +namespace Volo.CmsKit.Admin.Comments +{ + [Authorize(CmsKitAdminPermissions.Comments.Default)] + [RequiresGlobalFeature(typeof(CommentsFeature))] + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit-admin/comments")] + public class CommentAdminController : CmsKitAdminController, ICommentAdminAppService + { + protected readonly ICommentAdminAppService CommentAdminAppService; + + public CommentAdminController(ICommentAdminAppService commentAdminAppService) + { + CommentAdminAppService = commentAdminAppService; + } + + [HttpGet] + public virtual Task> GetListAsync(CommentGetListInput input) + { + return CommentAdminAppService.GetListAsync(input); + } + + [HttpGet] + [Route("{id}")] + public virtual Task GetAsync(Guid id) + { + return CommentAdminAppService.GetAsync(id); + } + + [HttpDelete] + [Route("{id}")] + [Authorize(CmsKitAdminPermissions.Comments.Delete)] + public virtual Task DeleteAsync(Guid id) + { + return CommentAdminAppService.DeleteAsync(id); + } + } +} \ No newline at end of file From edae47d9e060460bbdc07ec0560f6a0a166e4332 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 15:10:10 +0300 Subject: [PATCH 046/126] CmsKit - Refactoring for blogs domain --- .../Volo/CmsKit/Blogs/Blog.cs | 12 ++++---- .../Volo/CmsKit/Blogs/BlogPost.cs | 17 ++++++----- .../Volo/CmsKit/Blogs/BlogPostManager.cs | 29 +++++++++++-------- .../BlogPostSlugAlreadyExistException.cs | 7 +++-- .../Volo/CmsKit/Blogs/IBlogPostManager.cs | 5 ++-- .../Volo/CmsKit/Blogs/IBlogRepository.cs | 5 ++-- .../Volo/CmsKit/Blogs/EfCoreBlogRepository.cs | 9 +++--- .../MongoDB/Blogs/MongoBlogRepository.cs | 5 ++-- 8 files changed, 52 insertions(+), 37 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Blog.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Blog.cs index 79c496970c..832ed4385e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Blog.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Blog.cs @@ -20,18 +20,20 @@ namespace Volo.CmsKit.Blogs TenantId = tenantId; } - public string Name { get; protected set; } + [NotNull] + public virtual string Name { get; protected set; } - public string Slug { get; protected set; } + [NotNull] + public virtual string Slug { get; protected set; } - public Guid? TenantId { get; protected set; } + public virtual Guid? TenantId { get; protected set; } - public void SetName(string name) + public virtual void SetName(string name) { Name = Check.NotNullOrWhiteSpace(name, nameof(name), maxLength: BlogConsts.MaxNameLength); } - public void SetSlug(string slug) + public virtual void SetSlug(string slug) { Check.NotNullOrWhiteSpace(slug, nameof(slug), maxLength: BlogConsts.MaxNameLength); diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs index 7a52fe0d9f..bd7cf61516 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs @@ -12,15 +12,18 @@ namespace Volo.CmsKit.Blogs { public class BlogPost : FullAuditedAggregateRootWithUser, IMultiTenant { - public Guid BlogId { get; protected set; } + public virtual Guid BlogId { get; protected set; } - public string Title { get; protected set; } + [NotNull] + public virtual string Title { get; protected set; } - public string Slug { get; protected set; } + [NotNull] + public virtual string Slug { get; protected set; } - public string ShortDescription { get; protected set; } + [NotNull] + public virtual string ShortDescription { get; protected set; } - public Guid? TenantId { get; protected set; } + public virtual Guid? TenantId { get; protected set; } protected BlogPost() { @@ -39,7 +42,7 @@ namespace Volo.CmsKit.Blogs ShortDescription = shortDescription; } - public void SetTitle(string title) + public virtual void SetTitle(string title) { Title = Check.NotNullOrWhiteSpace(title, nameof(title), BlogPostConsts.MaxTitleLength); } @@ -51,7 +54,7 @@ namespace Volo.CmsKit.Blogs Slug = slug.NormalizeSlug(); } - public void SetShortDescription(string shortDescription) + public virtual void SetShortDescription(string shortDescription) { ShortDescription = Check.Length(shortDescription, nameof(shortDescription), BlogPostConsts.MaxShortDescriptionLength); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs index aed2b9fffd..2754794b26 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs @@ -1,44 +1,49 @@ -using System; +using JetBrains.Annotations; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Services; +using Volo.Abp.VirtualFileSystem; namespace Volo.CmsKit.Blogs { public class BlogPostManager : DomainService, IBlogPostManager { - protected readonly IBlogPostRepository blogPostRepository; - protected readonly IBlogRepository blogRepository; + protected IBlogPostRepository BlogPostRepository { get; } + protected IBlogRepository BlogRepository { get; } public BlogPostManager( IBlogPostRepository blogPostRepository, IBlogRepository blogRepository) { - this.blogPostRepository = blogPostRepository; - this.blogRepository = blogRepository; + this.BlogPostRepository = blogPostRepository; + this.BlogRepository = blogRepository; } - public async Task CreateAsync(BlogPost blogPost) + public virtual async Task CreateAsync(BlogPost blogPost) { await CheckBlogExistenceAsync(blogPost.BlogId); await CheckSlugExistenceAsync(blogPost.BlogId, blogPost.Slug); - return await blogPostRepository.InsertAsync(blogPost); + return await BlogPostRepository.InsertAsync(blogPost); } - public async Task UpdateAsync(BlogPost blogPost) + public virtual async Task UpdateAsync(BlogPost blogPost) { await CheckBlogExistenceAsync(blogPost.BlogId); - await blogPostRepository.UpdateAsync(blogPost); + await BlogPostRepository.UpdateAsync(blogPost); } - public async Task SetSlugUrlAsync(BlogPost blogPost, string newSlug) + public virtual async Task SetSlugUrlAsync(BlogPost blogPost, [NotNull] string newSlug) { + Check.NotNullOrWhiteSpace(newSlug, nameof(newSlug)); + await CheckSlugExistenceAsync(blogPost.BlogId, newSlug); blogPost.SetSlug(newSlug); @@ -46,7 +51,7 @@ namespace Volo.CmsKit.Blogs private async Task CheckSlugExistenceAsync(Guid blogId, string slug) { - if (await blogPostRepository.SlugExistsAsync(blogId, slug)) + if (await BlogPostRepository.SlugExistsAsync(blogId, slug)) { throw new BlogPostSlugAlreadyExistException(blogId, slug); } @@ -54,7 +59,7 @@ namespace Volo.CmsKit.Blogs private async Task CheckBlogExistenceAsync(Guid blogId) { - if (!await blogRepository.ExistsAsync(blogId)) + if (!await BlogRepository.ExistsAsync(blogId)) throw new EntityNotFoundException(typeof(Blog), blogId); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostSlugAlreadyExistException.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostSlugAlreadyExistException.cs index 8e59249299..034cb8e60d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostSlugAlreadyExistException.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostSlugAlreadyExistException.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.Serialization; using Volo.Abp; namespace Volo.CmsKit.Blogs @@ -9,7 +10,7 @@ namespace Volo.CmsKit.Blogs { } - internal BlogPostSlugAlreadyExistException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context) : base(serializationInfo, context) + internal BlogPostSlugAlreadyExistException(SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context) : base(serializationInfo, context) { } @@ -24,8 +25,8 @@ namespace Volo.CmsKit.Blogs WithData(nameof(BlogId), BlogId); } - public string Slug { get; } + public virtual string Slug { get; } - public Guid BlogId { get; } + public virtual Guid BlogId { get; } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs index 5027fa8e38..334b4912ef 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs @@ -1,4 +1,5 @@ -using System; +using JetBrains.Annotations; +using System; using System.Threading.Tasks; namespace Volo.CmsKit.Blogs @@ -9,6 +10,6 @@ namespace Volo.CmsKit.Blogs Task UpdateAsync(BlogPost blogPost); - Task SetSlugUrlAsync(BlogPost blogPost, string newSlug); + Task SetSlugUrlAsync(BlogPost blogPost, [NotNull] string newSlug); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogRepository.cs index 4213884057..2feb057111 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogRepository.cs @@ -1,4 +1,5 @@ using System; +using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; @@ -6,7 +7,7 @@ namespace Volo.CmsKit.Blogs { public interface IBlogRepository : IBasicRepository { - public Task GetBySlugAsync(string slug); - Task ExistsAsync(Guid blogId); + public Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default); + Task ExistsAsync(Guid blogId, CancellationToken cancellationToken = default); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs index d2ddbf35aa..f04889299c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using System; using System.Security.Cryptography.X509Certificates; +using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; @@ -14,14 +15,14 @@ namespace Volo.CmsKit.Blogs { } - public async Task ExistsAsync(Guid blogId) + public virtual async Task ExistsAsync(Guid blogId, CancellationToken cancellationToken = default) { - return await (await GetQueryableAsync()).AnyAsync(x => x.Id == blogId); + return await (await GetQueryableAsync()).AnyAsync(x => x.Id == blogId, cancellationToken); } - public Task GetBySlugAsync(string slug) + public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) { - return GetAsync(x => x.Slug == slug); + return GetAsync(x => x.Slug == slug, cancellationToken: cancellationToken); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs index d733f82bf6..d917842c59 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs @@ -1,5 +1,6 @@ using MongoDB.Driver.Core.Operations; using System; +using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; @@ -13,14 +14,14 @@ namespace Volo.CmsKit.MongoDB.Blogs { } - public async Task ExistsAsync(Guid blogId) + public virtual async Task ExistsAsync(Guid blogId, CancellationToken cancellationToken = default) { return await AsyncExecuter.AnyAsync( await GetQueryableAsync(), x => x.Id == blogId); } - public Task GetBySlugAsync(string slug) + public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) { return GetAsync(x => x.Slug == slug); } From a90343b674a4fbae31fb0c3f41cf246324bc3598 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 15:22:30 +0300 Subject: [PATCH 047/126] CmsKit - Blogs Application Refactoring --- .../Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs | 1 + .../CmsKit/Public/Blogs/IBlogPostPublicAppService.cs | 7 ++++--- .../Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs index d2c1114dfb..ee5ed3e126 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Authorization; using System; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogPostPublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogPostPublicAppService.cs index 0c9079ee7e..04234b4f06 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogPostPublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogPostPublicAppService.cs @@ -1,4 +1,5 @@ -using System; +using JetBrains.Annotations; +using System; using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; @@ -8,9 +9,9 @@ namespace Volo.CmsKit.Public.Blogs { public interface IBlogPostPublicAppService { - Task> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input); + Task> GetListAsync([NotNull] string blogSlug, PagedAndSortedResultRequestDto input); - Task GetAsync(string blogSlug, string blogPostSlug); + Task GetAsync([NotNull] string blogSlug, [NotNull] string blogPostSlug); Task GetCoverImageAsync(Guid id); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs index 3994720d73..644b4e4cc3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs @@ -1,4 +1,5 @@ -using System; +using JetBrains.Annotations; +using System; using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; @@ -26,7 +27,7 @@ namespace Volo.CmsKit.Public.Blogs BlobContainer = blobContainer; } - public async Task GetAsync(string blogSlug, string blogPostSlug) + public virtual async Task GetAsync([NotNull] string blogSlug, [NotNull] string blogPostSlug) { var blog = await BlogRepository.GetBySlugAsync(blogSlug); @@ -35,7 +36,7 @@ namespace Volo.CmsKit.Public.Blogs return ObjectMapper.Map(blogPost); } - public async Task> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input) + public virtual async Task> GetListAsync([NotNull] string blogSlug, PagedAndSortedResultRequestDto input) { var blog = await BlogRepository.GetBySlugAsync(blogSlug); @@ -46,7 +47,7 @@ namespace Volo.CmsKit.Public.Blogs ObjectMapper.Map, List>(blogPosts)); } - public async Task GetCoverImageAsync(Guid id) + public virtual async Task GetCoverImageAsync(Guid id) { var stream = await BlobContainer.GetAsync(id.ToString()); From 899ab7aa76cd335f33e468a48d8429cb6d19f31f Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 15:22:49 +0300 Subject: [PATCH 048/126] CmsKit - Blogs HttpApi refactoring --- .../Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs index 7f3545ad9c..ff95e71e45 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs @@ -28,14 +28,14 @@ namespace Volo.CmsKit.Public.Blogs [HttpGet] [Route("{blogSlug}/{blogPostSlug}")] - public Task GetAsync(string blogSlug, string blogPostSlug) + public virtual Task GetAsync(string blogSlug, string blogPostSlug) { return BlogPostPublicAppService.GetAsync(blogSlug, blogPostSlug); } [HttpGet] [Route("{id}/cover-image")] - public Task GetCoverImageAsync(Guid id) + public virtual Task GetCoverImageAsync(Guid id) { Response.Headers.Add("Content-Disposition", $"inline;filename=\"{id}\""); Response.Headers.Add("Accept-Ranges", "bytes"); @@ -47,7 +47,7 @@ namespace Volo.CmsKit.Public.Blogs [HttpGet] [Route("{blogSlug}")] - public Task> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input) + public virtual Task> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input) { return BlogPostPublicAppService.GetListAsync(blogSlug, input); } From ff5264ebd9e1b843e0f582b5c8faf1079d1da077 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 15:46:47 +0300 Subject: [PATCH 049/126] tag refactorings. - Make methods virtual - set injected instances to a protected setter-only property - use protected setters and expose set methods for properties need validation --- .../Admin/Tags/EntityTagAdminAppService.cs | 55 ++++++++-------- .../CmsKit/Admin/Tags/TagAdminAppService.cs | 2 +- .../Volo/CmsKit/Tags/CmsKitTagOptions.cs | 1 - .../CmsKit/Tags/DefaultTagDefinitionStore.cs | 15 ++--- .../Volo/CmsKit/Tags/EntityTag.cs | 6 +- .../Volo/CmsKit/Tags/EntityTagManager.cs | 25 ++++---- .../Volo/CmsKit/Tags/Tag.cs | 21 ++++--- .../CmsKit/Tags/TagEntityTypeDefiniton.cs | 3 +- .../Volo/CmsKit/Tags/TagManager.cs | 62 +++++++------------ .../CmsKit/Tags/EfCoreEntityTagRepository.cs | 24 +++---- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 2 - 11 files changed, 100 insertions(+), 116 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/EntityTagAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/EntityTagAdminAppService.cs index b36ffedbd2..dfa8a00ea3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/EntityTagAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/EntityTagAdminAppService.cs @@ -1,19 +1,17 @@ -using System; -using System.Collections.Generic; +using System.Linq; using System.Linq; using System.Threading.Tasks; -using Volo.CmsKit.Admin.Tags; using Volo.CmsKit.Tags; namespace Volo.CmsKit.Admin.Tags { public class EntityTagAdminAppService : CmsKitAdminAppServiceBase, IEntityTagAdminAppService { - protected readonly ITagDefinitionStore _tagDefinitionStore; - protected readonly IEntityTagManager _entityTagManager; - protected readonly ITagManager _tagManager; - protected readonly ITagRepository _tagRepository; - protected readonly IEntityTagRepository _entityTagRepository; + protected ITagDefinitionStore TagDefinitionStore { get; } + protected IEntityTagManager EntityTagManager { get; } + protected ITagManager TagManager { get; } + protected ITagRepository TagRepository { get; } + protected IEntityTagRepository EntityTagRepository { get; } public EntityTagAdminAppService( ITagDefinitionStore tagDefinitionStore, @@ -22,60 +20,61 @@ namespace Volo.CmsKit.Admin.Tags ITagRepository tagRepository, IEntityTagRepository entityTagRepository) { - _tagDefinitionStore = tagDefinitionStore; - _entityTagManager = entityTagManager; - _tagManager = tagManager; - _tagRepository = tagRepository; - _entityTagRepository = entityTagRepository; + TagDefinitionStore = tagDefinitionStore; + EntityTagManager = entityTagManager; + TagManager = tagManager; + TagRepository = tagRepository; + EntityTagRepository = entityTagRepository; } - public async Task AddTagToEntityAsync(EntityTagCreateDto input) + public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input) { - var definition = await _tagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); + var definition = await TagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); await CheckPolicyAsync(definition.CreatePolicy); - var tag = await _tagManager.GetOrAddAsync(input.EntityType, input.TagName, CurrentTenant?.Id); + var tag = await TagManager.GetOrAddAsync(input.EntityType, input.TagName, CurrentTenant?.Id); - await _entityTagManager.AddTagToEntityAsync( + await EntityTagManager.AddTagToEntityAsync( tag.Id, input.EntityType, input.EntityId, CurrentTenant?.Id); } - public async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input) + public virtual async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input) { - var definition = await _tagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); + var definition = await TagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); await CheckPolicyAsync(definition.DeletePolicy); - await _entityTagManager.RemoveTagFromEntityAsync( + await EntityTagManager.RemoveTagFromEntityAsync( input.TagId, input.EntityType, input.EntityId, CurrentTenant?.Id); } - public async Task SetEntityTagsAsync(EntityTagSetDto input) + public virtual async Task SetEntityTagsAsync(EntityTagSetDto input) { - var definition = await _tagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); + var definition = await TagDefinitionStore.GetTagEntityTypeDefinitionsAsync(input.EntityType); await CheckPolicyAsync(definition.UpdatePolicy); - var existingTags = await _tagRepository.GetAllRelatedTagsAsync(input.EntityType, input.EntityId, CurrentTenant?.Id); + var existingTags = + await TagRepository.GetAllRelatedTagsAsync(input.EntityType, input.EntityId, CurrentTenant?.Id); var deletedTags = existingTags.Where(x => !input.Tags.Contains(x.Name)).ToList(); var addedTags = input.Tags.Where(x => !existingTags.Any(a => a.Name == x)); - await _entityTagRepository.DeleteManyAsync(deletedTags.Select(s => s.Id).ToArray()); + await EntityTagRepository.DeleteManyAsync(deletedTags.Select(s => s.Id).ToArray()); foreach (var addedTag in addedTags) { - var tag = await _tagManager.GetOrAddAsync(input.EntityType, addedTag, CurrentTenant?.Id); + var tag = await TagManager.GetOrAddAsync(input.EntityType, addedTag, CurrentTenant?.Id); - await _entityTagManager.AddTagToEntityAsync(tag.Id, input.EntityType, input.EntityId, CurrentTenant?.Id); - } + await EntityTagManager.AddTagToEntityAsync(tag.Id, input.EntityType, input.EntityId, CurrentTenant?.Id); + } } } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs index eccdaf82c0..fd276cb31a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs @@ -72,7 +72,7 @@ namespace Volo.CmsKit.Admin.Tags x.EntityType.ToLower().Contains(input.Filter)); } - public async Task> GetTagDefinitionsAsync() + public virtual async Task> GetTagDefinitionsAsync() { var definitions = await TagManager.GetTagDefinitionsAsync(); diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/CmsKitTagOptions.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/CmsKitTagOptions.cs index 8f9b073d6b..e6530c887a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/CmsKitTagOptions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/CmsKitTagOptions.cs @@ -1,5 +1,4 @@ using JetBrains.Annotations; -using Volo.CmsKit.Tags; namespace Volo.CmsKit.Tags { diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/DefaultTagDefinitionStore.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/DefaultTagDefinitionStore.cs index 5a79bea25a..1787b2b949 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/DefaultTagDefinitionStore.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/DefaultTagDefinitionStore.cs @@ -11,11 +11,11 @@ namespace Volo.CmsKit.Tags { public class DefaultTagDefinitionStore : ITagDefinitionStore, ITransientDependency { - private readonly CmsKitTagOptions options; + protected CmsKitTagOptions CmsKitTagOptions { get; } public DefaultTagDefinitionStore(IOptions options) { - this.options = options.Value; + CmsKitTagOptions = options.Value; } /// @@ -28,7 +28,8 @@ namespace Volo.CmsKit.Tags { Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); - var result = options.EntityTypes.SingleOrDefault(x => x.EntityType == entityType) ?? throw new EntityNotTaggableException(entityType); + var result = CmsKitTagOptions.EntityTypes.SingleOrDefault(x => x.EntityType == entityType) ?? + throw new EntityNotTaggableException(entityType); return Task.FromResult(result); } @@ -38,7 +39,7 @@ namespace Volo.CmsKit.Tags /// public virtual Task> GetTagEntityTypeDefinitionListAsync() { - return Task.FromResult(options.EntityTypes.ToList()); + return Task.FromResult(CmsKitTagOptions.EntityTypes.ToList()); } /// @@ -50,9 +51,9 @@ namespace Volo.CmsKit.Tags { Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); - var definition = options.EntityTypes.SingleOrDefault(x => x.EntityType == entityType); + var isDefined = CmsKitTagOptions.EntityTypes.Any(x => x.EntityType == entityType); - return Task.FromResult(definition != null); + return Task.FromResult(isDefined); } } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs index c49a9661ef..793bf31d86 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs @@ -1,4 +1,6 @@ using System; +using JetBrains.Annotations; +using Volo.Abp; using Volo.Abp.Domain.Entities; using Volo.Abp.MultiTenancy; @@ -16,10 +18,10 @@ namespace Volo.CmsKit.Tags { } - internal EntityTag(Guid tagId, string entityId, Guid? tenantId = null) + internal EntityTag(Guid tagId, [NotNull] string entityId, Guid? tenantId = null) { TagId = tagId; - EntityId = entityId; + EntityId = Check.NotNullOrEmpty(entityId,nameof(entityId)); TenantId = tenantId; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTagManager.cs index 0de6328775..ad7a3088d5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTagManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTagManager.cs @@ -3,50 +3,47 @@ using System; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Services; -using Volo.CmsKit.Tags; namespace Volo.CmsKit.Tags { public class EntityTagManager : DomainService, IEntityTagManager { - protected readonly IEntityTagRepository _entityTagRepository; - protected readonly ITagDefinitionStore _tagDefinitionStore; + protected IEntityTagRepository EntityTagRepository { get; } + protected ITagDefinitionStore TagDefinitionStore { get; } public EntityTagManager( IEntityTagRepository entityTagRepository, ITagDefinitionStore tagDefinitionStore) { - _entityTagRepository = entityTagRepository; - _tagDefinitionStore = tagDefinitionStore; + EntityTagRepository = entityTagRepository; + TagDefinitionStore = tagDefinitionStore; } - public async Task AddTagToEntityAsync( + public virtual async Task AddTagToEntityAsync( [NotNull] Guid tagId, [NotNull] string entityType, [NotNull] string entityId, [CanBeNull] Guid? tenantId = null, CancellationToken cancellationToken = default) { - if (!await _tagDefinitionStore.IsDefinedAsync(entityType)) + if (!await TagDefinitionStore.IsDefinedAsync(entityType)) { throw new EntityNotTaggableException(entityType); } var entityTag = new EntityTag(tagId, entityId, tenantId); - - return await _entityTagRepository.InsertAsync(entityTag, cancellationToken: cancellationToken); + return await EntityTagRepository.InsertAsync(entityTag, cancellationToken: cancellationToken); } - public async Task RemoveTagFromEntityAsync( + public virtual async Task RemoveTagFromEntityAsync( [NotNull] Guid tagId, [NotNull] string entityType, [NotNull] string entityId, [CanBeNull] Guid? tenantId = null, CancellationToken cancellationToken = default) { - var entityTag = await _entityTagRepository.FindAsync(tagId, entityId, tenantId, cancellationToken); - - await _entityTagRepository.DeleteAsync(entityTag); + var entityTag = await EntityTagRepository.FindAsync(tagId, entityId, tenantId, cancellationToken); + await EntityTagRepository.DeleteAsync(entityTag, cancellationToken: cancellationToken); } } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs index fab09ed521..0c6ad99b2a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs @@ -8,11 +8,13 @@ namespace Volo.CmsKit.Tags { public class Tag : FullAuditedAggregateRoot, IMultiTenant { - public string EntityType { get; set; } + public virtual Guid? TenantId { get; set; } - public string Name { get; protected set; } - - public Guid? TenantId { get; set; } + [NotNull] + public virtual string EntityType { get; protected set; } + + [NotNull] + public virtual string Name { get; protected set; } protected Tag() { @@ -24,14 +26,19 @@ namespace Volo.CmsKit.Tags [NotNull] string name, Guid? tenantId = null) : base(id) { - EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); - SetName(name); + EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); + Name = Check.NotNullOrEmpty(name, nameof(name), TagConsts.MaxNameLength); TenantId = tenantId; } - public void SetName(string name) + public virtual void SetName(string name) { Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); } + + public virtual void SetEntityType(string entityType) + { + EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); + } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagEntityTypeDefiniton.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagEntityTypeDefiniton.cs index 463c78d4a4..4be00e4ac9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagEntityTypeDefiniton.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagEntityTypeDefiniton.cs @@ -25,13 +25,12 @@ namespace Volo.CmsKit.Tags [CanBeNull] string deletePolicy = null) : base(createPolicy, updatePolicy, deletePolicy) { EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); - DisplayName = displayName; } public bool Equals(TagEntityTypeDefiniton other) { - return EntityType == other.EntityType; + return EntityType == other?.EntityType; } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs index 77d50e9949..94a3784bcd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs @@ -1,35 +1,27 @@ using JetBrains.Annotations; -using Microsoft.Extensions.Options; using System; using System.Collections.Generic; -using System.Linq; using System.Threading; using System.Threading.Tasks; -using Volo.Abp; using Volo.Abp.Domain.Services; namespace Volo.CmsKit.Tags { public class TagManager : DomainService, ITagManager { - private readonly ITagRepository _tagRepository; - private readonly ITagDefinitionStore _tagDefinitionStore; + protected ITagRepository TagRepository { get; } + protected ITagDefinitionStore TagDefinitionStore { get; } - public TagManager( - ITagRepository tagRepository, - ITagDefinitionStore tagDefinitionStore) + public TagManager(ITagRepository tagRepository, ITagDefinitionStore tagDefinitionStore) { - _tagRepository = tagRepository; - _tagDefinitionStore = tagDefinitionStore; + TagRepository = tagRepository; + TagDefinitionStore = tagDefinitionStore; } - public async Task GetOrAddAsync( - [NotNull] string entityType, - [NotNull] string name, - Guid? tenantId = null, - CancellationToken cancellationToken = default) + public virtual async Task GetOrAddAsync([NotNull] string entityType, [NotNull] string name, + Guid? tenantId = null, CancellationToken cancellationToken = default) { - var entity = await _tagRepository.FindAsync(entityType, name, tenantId, cancellationToken); + var entity = await TagRepository.FindAsync(entityType, name, tenantId, cancellationToken); if (entity == null) { @@ -39,53 +31,43 @@ namespace Volo.CmsKit.Tags return entity; } - public async Task InsertAsync( - Guid id, - [NotNull] string entityType, - [NotNull] string name, - Guid? tenantId = null, - CancellationToken cancellationToken = default) + public virtual async Task InsertAsync(Guid id, [NotNull] string entityType, [NotNull] string name, + Guid? tenantId = null, CancellationToken cancellationToken = default) { - if (await _tagRepository.AnyAsync(entityType, name, tenantId, cancellationToken)) + if (!await TagDefinitionStore.IsDefinedAsync(entityType)) { - throw new TagAlreadyExistException(entityType, name); + throw new EntityNotTaggableException(entityType); } - if (!await _tagDefinitionStore.IsDefinedAsync(entityType)) + if (await TagRepository.AnyAsync(entityType, name, tenantId, cancellationToken)) { - throw new EntityNotTaggableException(entityType); + throw new TagAlreadyExistException(entityType, name); } - return await _tagRepository.InsertAsync( - new Tag( - id, - entityType, - name, - tenantId), + return await TagRepository.InsertAsync(new Tag(id, entityType, name, tenantId), cancellationToken: cancellationToken); } - public async Task UpdateAsync( - Guid id, - [NotNull] string name, + public virtual async Task UpdateAsync(Guid id, [NotNull] string name, CancellationToken cancellationToken = default) { - var entity = await _tagRepository.GetAsync(id, cancellationToken: cancellationToken); + var entity = await TagRepository.GetAsync(id, cancellationToken: cancellationToken); if (name != entity.Name && - await _tagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken)) + await TagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken)) { throw new TagAlreadyExistException(entity.EntityType, name); } entity.SetName(name); - return await _tagRepository.UpdateAsync(entity, cancellationToken: cancellationToken); + return await TagRepository.UpdateAsync(entity, cancellationToken: cancellationToken); } - public Task> GetTagDefinitionsAsync(CancellationToken cancellationToken = default) + public virtual Task> GetTagDefinitionsAsync( + CancellationToken cancellationToken = default) { - return _tagDefinitionStore.GetTagEntityTypeDefinitionListAsync(); + return TagDefinitionStore.GetTagEntityTypeDefinitionListAsync(); } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs index f1d0119885..5e1bbcebea 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs @@ -1,8 +1,6 @@ using JetBrains.Annotations; -using Nito.Disposables; using System; using System.Linq; -using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; @@ -11,30 +9,32 @@ using Volo.CmsKit.EntityFrameworkCore; namespace Volo.CmsKit.Tags { - public class EfCoreEntityTagRepository: EfCoreRepository, IEntityTagRepository + public class EfCoreEntityTagRepository : EfCoreRepository, IEntityTagRepository { - public EfCoreEntityTagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + public EfCoreEntityTagRepository(IDbContextProvider dbContextProvider) : base( + dbContextProvider) { } - public async Task DeleteManyAsync(Guid[] tagIds, CancellationToken cancellationToken = default) + public virtual async Task DeleteManyAsync(Guid[] tagIds, CancellationToken cancellationToken = default) { - var dbSet = await GetDbSetAsync(); - + var dbContext = await GetDbContextAsync(); + var dbSet = dbContext.Set(); dbSet.RemoveRange(dbSet.Where(x => tagIds.Contains(x.TagId))); + await dbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } - public Task FindAsync( + public virtual Task FindAsync( [NotNull] Guid tagId, [NotNull] string entityId, [CanBeNull] Guid? tenantId, CancellationToken cancellationToken = default) { return base.FindAsync(x => - x.TagId == tagId && - x.EntityId == entityId && - x.TenantId == tenantId, - cancellationToken: cancellationToken); + x.TagId == tagId && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: cancellationToken); } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs index 3d917a059a..77c4854b8d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs @@ -5,10 +5,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.VirtualFileSystem; using Volo.CmsKit.EntityFrameworkCore; namespace Volo.CmsKit.Tags From 5d03d0e8c6d3e3de72f15c7f519dbb697310e125 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 16:07:30 +0300 Subject: [PATCH 050/126] make methods virtual --- .../Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs | 2 +- .../Volo/CmsKit/Contents/ContentManager.cs | 2 +- .../Volo/CmsKit/Contents/EfCoreContentRepository.cs | 8 ++++---- .../CmsKit/MongoDB/Contents/MongoContentRepository.cs | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs index 8ec8559e34..020b4fd29e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs @@ -56,7 +56,7 @@ namespace Volo.CmsKit.Admin.Contents return MapToGetOutputDto(entity); } - public async Task GetAsync( + public virtual async Task GetAsync( [NotNull] string entityType, [NotNull] string entityId) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs index 4ca9554289..707f15bbb9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs @@ -18,7 +18,7 @@ namespace Volo.CmsKit.Contents ContentRepository = contentRepository; } - public async Task InsertAsync(Content content, CancellationToken cancellationToken = default) + public virtual async Task InsertAsync(Content content, CancellationToken cancellationToken = default) { if (await ContentRepository.ExistsAsync(content.EntityType, content.EntityId, content.TenantId, cancellationToken)) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs index 884c5e9b01..e8b88161ca 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs @@ -15,7 +15,7 @@ namespace Volo.CmsKit.Contents { } - public Task GetAsync( + public virtual Task GetAsync( string entityType, string entityId, Guid? tenantId = null, @@ -29,7 +29,7 @@ namespace Volo.CmsKit.Contents ); } - public Task FindAsync( + public virtual Task FindAsync( string entityType, string entityId, Guid? tenantId = null, @@ -43,7 +43,7 @@ namespace Volo.CmsKit.Contents ); } - public Task DeleteAsync( + public virtual Task DeleteAsync( string entityType, string entityId, Guid? tenantId = null, @@ -56,7 +56,7 @@ namespace Volo.CmsKit.Contents cancellationToken: GetCancellationToken(cancellationToken)); } - public async Task ExistsAsync( + public virtual async Task ExistsAsync( [NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs index 1068c352d5..fed8fe6e2e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs @@ -15,7 +15,7 @@ namespace Volo.CmsKit.MongoDB.Contents { } - public Task GetAsync( + public virtual Task GetAsync( string entityType, string entityId, Guid? tenantId = null, @@ -29,7 +29,7 @@ namespace Volo.CmsKit.MongoDB.Contents ); } - public Task FindAsync( + public virtual Task FindAsync( string entityType, string entityId, Guid? tenantId = null, @@ -43,7 +43,7 @@ namespace Volo.CmsKit.MongoDB.Contents ); } - public Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + public virtual Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) { return DeleteAsync(x => x.EntityType == entityType && @@ -52,7 +52,7 @@ namespace Volo.CmsKit.MongoDB.Contents cancellationToken: GetCancellationToken(cancellationToken)); } - public async Task ExistsAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + public virtual async Task ExistsAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) { return await (await GetMongoQueryableAsync(cancellationToken)).AnyAsync(x => x.EntityType == entityType && From cd3bd24c702059480251c3d4eb68228523986bfd Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 16:07:46 +0300 Subject: [PATCH 051/126] use protected property instead of variable --- .../Volo/CmsKit/Public/Contents/ContentPublicAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs index f00f2bdb2d..0fc31e1b4b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs @@ -5,7 +5,7 @@ namespace Volo.CmsKit.Public.Contents { public class ContentPublicAppService : CmsKitAppServiceBase, IContentAppService { - protected readonly IContentRepository ContentRepository; + protected IContentRepository ContentRepository { get; } public ContentPublicAppService(IContentRepository contentRepository) { From 96e3a9300cb38c17a22e5597fd0e438ccfa370de Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 16:11:14 +0300 Subject: [PATCH 052/126] use protected property instead of variable. --- .../Volo/CmsKit/Admin/Pages/PageAdminAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs index 48a02eb6cf..ce0a57800b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs @@ -14,7 +14,7 @@ namespace Volo.CmsKit.Admin.Pages [Authorize(CmsKitAdminPermissions.Pages.Default)] public class PageAdminAppService : CmsKitAdminAppServiceBase, IPageAdminAppService { - protected readonly IPageRepository PageRepository; + protected IPageRepository PageRepository { get; } public PageAdminAppService(IPageRepository pageRepository) { From 69c5294c69c04d1b55f1e1d2a4f0a398c0591e42 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 16:11:41 +0300 Subject: [PATCH 053/126] app service renaming --- .../Pages/{PageAppService.cs => PagePublicAppService.cs} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/{PageAppService.cs => PagePublicAppService.cs} (71%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs similarity index 71% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs index 481a773efc..a469046a43 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs @@ -3,11 +3,11 @@ using Volo.CmsKit.Pages; namespace Volo.CmsKit.Public.Pages { - public class PageAppService : CmsKitPublicAppServiceBase, IPageAppService + public class PagePublicAppService : CmsKitPublicAppServiceBase, IPageAppService { - protected readonly IPageRepository PageRepository; + protected IPageRepository PageRepository { get; } - public PageAppService(IPageRepository pageRepository) + public PagePublicAppService(IPageRepository pageRepository) { PageRepository = pageRepository; } From 39f7247b595ff542d7ec91f98fc48be6810e68c6 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 16:11:53 +0300 Subject: [PATCH 054/126] code formatting --- .../Volo/CmsKit/Pages/EfCorePageRepository.cs | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs index 2fc6d92c52..c51a51c632 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs @@ -17,13 +17,14 @@ namespace Volo.CmsKit.Pages { } - public virtual async Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) + public virtual async Task GetCountAsync(string filter = null, + CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()).WhereIf( - !filter.IsNullOrWhiteSpace(), - x => - x.Title.Contains(filter) - ).CountAsync(GetCancellationToken(cancellationToken)); + !filter.IsNullOrWhiteSpace(), + x => + x.Title.Contains(filter) + ).CountAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync( @@ -34,12 +35,12 @@ namespace Volo.CmsKit.Pages CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()).WhereIf( - !filter.IsNullOrWhiteSpace(), - x => - x.Title.Contains(filter)) - .OrderBy(sorting ?? nameof(Page.Title)) - .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)); + !filter.IsNullOrWhiteSpace(), + x => + x.Title.Contains(filter)) + .OrderBy(sorting ?? nameof(Page.Title)) + .PageBy(skipCount, maxResultCount) + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual Task GetByUrlAsync(string url, CancellationToken cancellationToken = default) @@ -57,4 +58,4 @@ namespace Volo.CmsKit.Pages return await (await GetDbSetAsync()).AnyAsync(x => x.Url == url, GetCancellationToken(cancellationToken)); } } -} +} \ No newline at end of file From ea2227fbb1fd6c241b868f74edd7c98b4674fc8c Mon Sep 17 00:00:00 2001 From: Ahmet Date: Wed, 17 Feb 2021 17:45:57 +0300 Subject: [PATCH 055/126] refactoring --- .../Volo/CmsKit/Admin/Comments/CommentGetListInput.cs | 2 -- .../Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs | 4 ++-- .../Volo/CmsKit/Comments/ICommentRepository.cs | 2 +- .../Volo/CmsKit/Comments/EfCoreCommentRepository.cs | 8 ++++---- .../CmsKit/MongoDB/Comments/MongoCommentRepository.cs | 4 ++-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs index 88e8d459b1..beaf997947 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs @@ -5,8 +5,6 @@ namespace Volo.CmsKit.Admin.Comments { public class CommentGetListInput : PagedAndSortedResultRequestDto { - public string Filter { get; set; } - public string EntityType { get; set; } public string EntityId { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs index 12ac3b247e..60c83a2551 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -25,7 +25,7 @@ namespace Volo.CmsKit.Admin.Comments public virtual async Task> GetListAsync(CommentGetListInput input) { var totalCount = await CommentRepository.GetCountAsync( - input.Filter, + input.Text, input.EntityType, input.EntityId, input.RepliedCommentId, @@ -34,7 +34,7 @@ namespace Volo.CmsKit.Admin.Comments input.CreationEndDate); var comments = await CommentRepository.GetListAsync( - input.Filter, + input.Text, input.EntityType, input.EntityId, input.RepliedCommentId, diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs index 7ea61d47bf..6293e125b6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs @@ -26,7 +26,7 @@ namespace Volo.CmsKit.Comments ); Task GetCountAsync( - string filter = null, + string text = null, string entityType = null, string entityId = null, Guid? repliedCommentId = null, diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs index 95781ae496..1e939e7740 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs @@ -72,7 +72,7 @@ namespace Volo.CmsKit.Comments } public async Task GetCountAsync( - string filter = null, + string text = null, string entityType = null, string entityId = null, Guid? repliedCommentId = null, @@ -83,7 +83,7 @@ namespace Volo.CmsKit.Comments ) { var query = await GetListQueryAsync( - filter, + text, entityType, entityId, repliedCommentId, @@ -146,8 +146,8 @@ namespace Volo.CmsKit.Comments { return (await GetDbSetAsync()) .WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Text.Contains(filter)) - .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.EntityType == entityType) - .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.EntityId == entityId) + .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.EntityType.Contains(entityType)) + .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.EntityId.Contains(entityId)) .WhereIf(repliedCommentId.HasValue, c => c.RepliedCommentId == repliedCommentId) .WhereIf(creatorId.HasValue, c => c.CreatorId == creatorId) .WhereIf(creationStartDate.HasValue, c => c.CreationTime >= creationStartDate) diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index 78d727b57c..39eb8cb223 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -72,7 +72,7 @@ namespace Volo.CmsKit.MongoDB.Comments } public async Task GetCountAsync( - string filter = null, + string text = null, string entityType = null, string entityId = null, Guid? repliedCommentId = null, @@ -83,7 +83,7 @@ namespace Volo.CmsKit.MongoDB.Comments ) { var query = await GetListQueryAsync( - filter, + text, entityType, entityId, repliedCommentId, From f3195ecd1eca8a2a9242b447626bf4b52dd043e4 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 17:49:36 +0300 Subject: [PATCH 056/126] CmsKit - Blogs Refactor namespaces --- .../Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs | 2 -- .../Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs | 1 - .../src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs | 2 -- .../Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs | 4 ---- .../Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs | 1 - .../Volo/CmsKit/Blogs/IBlogPostRepository.cs | 2 -- .../Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs | 4 ---- 7 files changed, 16 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs index f0485cc344..3544b3d7af 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogAdminAppService.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Volo.Abp.Application.Services; namespace Volo.CmsKit.Admin.Blogs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs index ee5ed3e126..d2c1114dfb 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs @@ -1,6 +1,5 @@ using Microsoft.AspNetCore.Authorization; using System; -using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs index bd7cf61516..2e4949cd84 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPost.cs @@ -1,10 +1,8 @@ using JetBrains.Annotations; using System; -using System.Text.RegularExpressions; using Volo.Abp; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; -using Volo.CmsKit.Blogs; using Volo.CmsKit.Blogs.Extensions; using Volo.CmsKit.Users; diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs index 2754794b26..dd920b637f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs @@ -1,13 +1,9 @@ using JetBrains.Annotations; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Services; -using Volo.Abp.VirtualFileSystem; namespace Volo.CmsKit.Blogs { diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs index 334b4912ef..9a3afebf71 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostManager.cs @@ -1,5 +1,4 @@ using JetBrains.Annotations; -using System; using System.Threading.Tasks; namespace Volo.CmsKit.Blogs diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs index 198cfca104..943ea381f3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogPostRepository.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs index ff95e71e45..e22ef54545 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs @@ -1,15 +1,11 @@ using Microsoft.AspNetCore.Mvc; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Content; using Volo.Abp.GlobalFeatures; using Volo.CmsKit.GlobalFeatures; -using Volo.CmsKit.Public.Blogs; namespace Volo.CmsKit.Public.Blogs { From 2b5ad0ac42cb182aedfd3a8a96fbcfdb912486f3 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 17:53:51 +0300 Subject: [PATCH 057/126] CmsKit - Remove this keyword from BlogPostManager --- .../Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs index dd920b637f..7ba85f8ce6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogPostManager.cs @@ -16,8 +16,8 @@ namespace Volo.CmsKit.Blogs IBlogPostRepository blogPostRepository, IBlogRepository blogRepository) { - this.BlogPostRepository = blogPostRepository; - this.BlogRepository = blogRepository; + BlogPostRepository = blogPostRepository; + BlogRepository = blogRepository; } public virtual async Task CreateAsync(BlogPost blogPost) From 950552575564f833b0a44191f2ce993715ae511d Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 17:55:13 +0300 Subject: [PATCH 058/126] CmsKit - CancellationToken usage at MongoBlogRepository --- .../Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs index d917842c59..e6b5f01e7f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs @@ -18,12 +18,13 @@ namespace Volo.CmsKit.MongoDB.Blogs { return await AsyncExecuter.AnyAsync( await GetQueryableAsync(), - x => x.Id == blogId); + x => x.Id == blogId, + cancellationToken); } public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) { - return GetAsync(x => x.Slug == slug); + return GetAsync(x => x.Slug == slug, cancellationToken); } } } From c3579202056b0796bf35e4124498a716cf4810a9 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 17:56:47 +0300 Subject: [PATCH 059/126] CmsKit - Fix of CancellationToken usage at MongoBlogRepository --- .../Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs index e6b5f01e7f..2b215d55c6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs @@ -24,7 +24,7 @@ namespace Volo.CmsKit.MongoDB.Blogs public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) { - return GetAsync(x => x.Slug == slug, cancellationToken); + return GetAsync(x => x.Slug == slug, cancellationToken: cancellationToken); } } } From aa14d0cc21590811412522151c42a324aac1abf4 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 11:26:05 +0300 Subject: [PATCH 060/126] CmsKit - Move FeatureCheck to out of Configure method --- .../src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs index 0295a3857c..87f0e34bc9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs @@ -59,13 +59,13 @@ namespace Volo.CmsKit.Public.Web public override void PostConfigureServices(ServiceConfigurationContext context) { - Configure(options => + if (GlobalFeatureManager.Instance.IsEnabled()) { - if (GlobalFeatureManager.Instance.IsEnabled()) + Configure(options => { options.Conventions.AddPageRoute("/CmsKit/Pages/Index", @"/pages/{pageUrl:minlength(1)}"); - } - }); + }); + } } } } From f9285cb649ccbb463592e50ef3d4ca80d1106009 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 18 Feb 2021 12:01:03 +0300 Subject: [PATCH 061/126] Use getter only properties instead of variables for injected services --- .../Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs | 3 +-- .../Volo/CmsKit/Admin/Comments/CommentAdminController.cs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs index 60c83a2551..e045f1137a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -15,7 +15,7 @@ namespace Volo.CmsKit.Admin.Comments [Authorize(CmsKitAdminPermissions.Comments.Default)] public class CommentAdminAppService : CmsKitAdminAppServiceBase, ICommentAdminAppService { - protected readonly ICommentRepository CommentRepository; + protected ICommentRepository CommentRepository { get; } public CommentAdminAppService(ICommentRepository commentRepository) { @@ -65,7 +65,6 @@ namespace Volo.CmsKit.Admin.Comments public virtual async Task DeleteAsync(Guid id) { var comment = await CommentRepository.GetAsync(id); - await CommentRepository.DeleteWithRepliesAsync(comment); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs index 8d25f93b32..9f71761235 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs @@ -17,7 +17,7 @@ namespace Volo.CmsKit.Admin.Comments [Route("api/cms-kit-admin/comments")] public class CommentAdminController : CmsKitAdminController, ICommentAdminAppService { - protected readonly ICommentAdminAppService CommentAdminAppService; + protected ICommentAdminAppService CommentAdminAppService { get; } public CommentAdminController(ICommentAdminAppService commentAdminAppService) { From 0f434debf00caf240f8070a3bf34f13ec8a8c43f Mon Sep 17 00:00:00 2001 From: Mehmet Erim <34455572+mehmet-erim@users.noreply.github.com> Date: Thu, 18 Feb 2021 13:58:44 +0300 Subject: [PATCH 062/126] Update Multi-Tenancy.md --- docs/en/UI/Angular/Multi-Tenancy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/UI/Angular/Multi-Tenancy.md b/docs/en/UI/Angular/Multi-Tenancy.md index 7622db6de0..cded16e7d4 100644 --- a/docs/en/UI/Angular/Multi-Tenancy.md +++ b/docs/en/UI/Angular/Multi-Tenancy.md @@ -91,10 +91,10 @@ export const environment = { > **Important Note:** The `application.baseUrl` and the `{0}` placeholder in the value of the `baseUrl` property are required to be able to get tenant from running URL. Other placeholders in API URLs are optional. -After the configuration above, if your app runs on the `mytenant1.mydomain.com`, the app will get tenant name as **mytenant1** and replace the environment object in `ConfigState` on app initialization as follows: +After the configuration above, if your app runs on the `mytenant1.mydomain.com`, the app will get tenant name as **mytenant1** and replace the environment object in `EnvironmentService` on app initialization as follows: ```js -// environment object in ConfigState +// environment object in EnvironmentService { //... From 4a7297558a09e26c7c0286d7142d4d79d53c6d9c Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 14:17:15 +0300 Subject: [PATCH 063/126] CmsKit - Refactor for BlogFeatureAdminAppService.cs --- .../Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index d578d00c92..70880f5ac8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -34,16 +34,16 @@ namespace Volo.CmsKit.Admin.Blogs [Authorize(CmsKitAdminPermissions.Blogs.Features)] public async Task SetAsync(Guid blogId, BlogFeatureDto dto) { - var existing = await BlogFeatureRepository.FindAsync(blogId, dto.FeatureName); - if (existing == null) + var blogFeature = await BlogFeatureRepository.FindAsync(blogId, dto.FeatureName); + if (blogFeature == null) { var blogFeature = new BlogFeature(blogId, dto.FeatureName, dto.Enabled); await BlogFeatureRepository.InsertAsync(blogFeature); } else { - existing.Enabled = dto.Enabled; - await BlogFeatureRepository.UpdateAsync(existing); + blogFeature.Enabled = dto.Enabled; + await BlogFeatureRepository.UpdateAsync(blogFeature); } } } From 50f5191b2b1bdf1811460d185507a7789539a26d Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 14:17:51 +0300 Subject: [PATCH 064/126] CmsKit - Refactor for BlogFeatureAdminAppService.cs --- .../Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index 70880f5ac8..ec05ca85ca 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -37,7 +37,7 @@ namespace Volo.CmsKit.Admin.Blogs var blogFeature = await BlogFeatureRepository.FindAsync(blogId, dto.FeatureName); if (blogFeature == null) { - var blogFeature = new BlogFeature(blogId, dto.FeatureName, dto.Enabled); + var newBlogFeature = new BlogFeature(blogId, dto.FeatureName, dto.Enabled); await BlogFeatureRepository.InsertAsync(blogFeature); } else From 9be85963c91654253524ce41f75ced8bdbb3b9dc Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 14:25:56 +0300 Subject: [PATCH 065/126] CmsKit - Seperate BlogFeature input & output dtos --- .../Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs | 8 +++++--- .../Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs | 11 +++++++++++ .../CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs | 2 +- .../CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs | 2 +- .../Admin/CmsKitAdminApplicationAutoMapperProfile.cs | 1 + .../CmsKit/Admin/Blogs/BlogFeatureAdminController.cs | 2 +- 6 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs index afeb23642e..4ba3d20301 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs @@ -1,10 +1,12 @@ -using System.ComponentModel.DataAnnotations; +using JetBrains.Annotations; +using System; +using Volo.Abp.Application.Dtos; namespace Volo.CmsKit.Admin.Blogs { - public class BlogFeatureDto + public class BlogFeatureDto : EntityDto { - [Required] + [NotNull] public string FeatureName { get; set; } public bool Enabled { get; set; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs new file mode 100644 index 0000000000..0255982227 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs @@ -0,0 +1,11 @@ +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Admin.Blogs +{ + public class BlogFeatureInputDto + { + [Required] + public string FeatureName { get; set; } + public bool Enabled { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs index 5ddf45d337..639b7515fc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs @@ -8,7 +8,7 @@ namespace Volo.CmsKit.Admin.Blogs { public interface IBlogFeatureAdminAppService { - Task SetAsync(Guid blogId, BlogFeatureDto dto); + Task SetAsync(Guid blogId, BlogFeatureInputDto dto); Task> GetListAsync(Guid blogId); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index ec05ca85ca..3e0df0b683 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -32,7 +32,7 @@ namespace Volo.CmsKit.Admin.Blogs } [Authorize(CmsKitAdminPermissions.Blogs.Features)] - public async Task SetAsync(Guid blogId, BlogFeatureDto dto) + public async Task SetAsync(Guid blogId, BlogFeatureInputDto dto) { var blogFeature = await BlogFeatureRepository.FindAsync(blogId, dto.FeatureName); if (blogFeature == null) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 85f56f5e17..ffcd4ecf04 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -32,6 +32,7 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Destination); CreateMap(); + CreateMap(); CreateMap(MemberList.Destination); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs index 7a00146b92..b3c0e9f799 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs @@ -33,7 +33,7 @@ namespace Volo.CmsKit.Admin.Blogs } [HttpPut] - public Task SetAsync(Guid blogId, BlogFeatureDto dto) + public Task SetAsync(Guid blogId, BlogFeatureInputDto dto) { return BlogFeatureAdminAppService.SetAsync(blogId, dto); } From f907991eab571133960f4dcc835c370cf618cb12 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 14:34:56 +0300 Subject: [PATCH 066/126] CmsKit - Convert string array to list in IBlogFeatureRepository --- .../Volo/CmsKit/Blogs/IBlogFeatureRepository.cs | 2 +- .../Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs | 2 +- .../Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs index b7ba075e92..7f66f222db 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureRepository.cs @@ -11,7 +11,7 @@ namespace Volo.CmsKit.Blogs { Task> GetListAsync(Guid blogId); - Task> GetListAsync(Guid blogId, string[] featureNames); + Task> GetListAsync(Guid blogId, List featureNames); Task FindAsync(Guid blogId, string featureName); } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs index ee3b7cc4a5..c5fe9d658f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogFeatureRepository.cs @@ -27,7 +27,7 @@ namespace Volo.CmsKit.Blogs .ToListAsync(); } - public async Task> GetListAsync(Guid blogId, string[] featureNames) + public async Task> GetListAsync(Guid blogId, List featureNames) { return await (await GetQueryableAsync()) .Where(x => x.BlogId == blogId && featureNames.Contains(x.FeatureName)) diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs index 69613c01f2..7c779af6c6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogFeatureRepository.cs @@ -29,7 +29,7 @@ namespace Volo.CmsKit.MongoDB.Blogs .ToListAsync(); } - public async Task> GetListAsync(Guid blogId, string[] featureNames) + public async Task> GetListAsync(Guid blogId, List featureNames) { return await (await GetMongoQueryableAsync()) .Where(x => x.BlogId == blogId && featureNames.Contains(x.FeatureName)) From ba21864119b75ce5515b589d3d446a91ac108554 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 14:37:42 +0300 Subject: [PATCH 067/126] CmsKit - Convert to list from array of string in GetBlogFeatureInput --- .../Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs index a98dfbc264..8be4ebaa07 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/GetBlogFeatureInput.cs @@ -8,6 +8,6 @@ namespace Volo.CmsKit.Public.Blogs { public class GetBlogFeatureInput { - public string[] FeatureNames { get; set; } + public List FeatureNames { get; set; } } } From f565994fc7e2d6113a3fa6f289e0a09f7d93b0f8 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 14:51:16 +0300 Subject: [PATCH 068/126] CmsKit - Remove duplicated 'Blogs' from route --- .../Volo/CmsKit/Admin/Blogs/BlogAdminController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs index d63a3317ce..da565413b1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs @@ -17,7 +17,7 @@ namespace Volo.CmsKit.Admin.Blogs [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] [Area("cms-kit")] [Authorize(CmsKitAdminPermissions.Blogs.Default)] - [Route("api/cms-kit-admin/blogs/blogs")] + [Route("api/cms-kit-admin/blogs")] public class BlogAdminController : CmsKitAdminController, IBlogAdminAppService { protected IBlogAdminAppService BlogAdminAppService { get; } From 8ea55c10f0edc3847d3460f71a4e443195fa1a05 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 15:42:13 +0300 Subject: [PATCH 069/126] CmsKit - Change method name as GetOrDefault in IBlogFeaturePublicAppService --- .../CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs | 2 +- .../Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs | 2 +- .../Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs | 4 ++-- .../Pages/CmsKit/Blogs/BlogPost.cshtml.cs | 6 +++--- .../Blogs/BlogFeaturePublicAppService_Test.cs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs index 4606198932..c467b3acc7 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs @@ -6,6 +6,6 @@ namespace Volo.CmsKit.Public.Blogs { public interface IBlogFeaturePublicAppService { - Task GetAsync(Guid blogId, string featureName); + Task GetOrDefaultAsync(Guid blogId, string featureName); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs index 2e8e553a6c..bd95bca2b3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs @@ -22,7 +22,7 @@ namespace Volo.CmsKit.Public.Blogs Cache = cache; } - public async Task GetAsync(Guid blogId, string featureName) + public async Task GetOrDefaultAsync(Guid blogId, string featureName) { return await Cache.GetOrAddAsync( $"{blogId}_{featureName}", diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs index 6c3579da4b..de957f5bd2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs @@ -19,9 +19,9 @@ namespace Volo.CmsKit.Public.HttpApi.Volo.CmsKit.Public.Blogs [HttpGet] [Route("{blogId}/{featureName}")] - public Task GetAsync(Guid blogId, string featureName) + public Task GetOrDefaultAsync(Guid blogId, string featureName) { - return BlogFeaturePublicAppService.GetAsync(blogId, featureName); + return BlogFeaturePublicAppService.GetOrDefaultAsync(blogId, featureName); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs index fb7a8de563..db178f2515 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs @@ -46,17 +46,17 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Blogs if (GlobalFeatureManager.Instance.IsEnabled()) { - CommentsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.BlogId, BlogPostConsts.CommentsFeatureName); + CommentsFeature = await BlogFeaturePublicAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.CommentsFeatureName); } if (GlobalFeatureManager.Instance.IsEnabled()) { - ReactionsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.BlogId, BlogPostConsts.ReactionsFeatureName); + ReactionsFeature = await BlogFeaturePublicAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.ReactionsFeatureName); } if (GlobalFeatureManager.Instance.IsEnabled()) { - RatingsFeature = await BlogFeaturePublicAppService.GetAsync(BlogPost.BlogId, BlogPostConsts.RatingsFeatureName); + RatingsFeature = await BlogFeaturePublicAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.RatingsFeatureName); } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs index 3376173986..fc34e8df8f 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs @@ -23,7 +23,7 @@ namespace Volo.CmsKit.Blogs [Fact] public async Task GetAsync_ShouldWorkProperly_WithExistingFeatureName() { - var result = await blogFeaturePublicAppService.GetAsync(testData.Blog_Id, testData.BlogFeature_1_FeatureName); + var result = await blogFeaturePublicAppService.GetOrDefaultAsync(testData.Blog_Id, testData.BlogFeature_1_FeatureName); result.ShouldNotBeNull(); result.FeatureName.ShouldBe(testData.BlogFeature_1_FeatureName); @@ -33,7 +33,7 @@ namespace Volo.CmsKit.Blogs public async Task GetAsync_ShouldReturnDefault_WithNonExistingFeatureName() { var nonExistingFeatureName = "AnyOtherFeature"; - var result = await blogFeaturePublicAppService.GetAsync(testData.Blog_Id, nonExistingFeatureName); + var result = await blogFeaturePublicAppService.GetOrDefaultAsync(testData.Blog_Id, nonExistingFeatureName); var defaultFeature = new BlogFeature(Guid.Empty, nonExistingFeatureName); result.ShouldNotBeNull(); From 9c80ebdf149892d6a20f0c02dacc17bb63164fa4 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 15:43:53 +0300 Subject: [PATCH 070/126] CmsKit - Change cache parameter to SlidingExpiration from AbsoluteExpirationRelativeToNow --- .../Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs index bd95bca2b3..e001f524ed 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs @@ -29,7 +29,7 @@ namespace Volo.CmsKit.Public.Blogs () => GetFromDatabaseAsync(blogId, featureName), () => new DistributedCacheEntryOptions { - AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1) + SlidingExpiration = TimeSpan.FromMinutes(1) }); } From 188fdb3808570c8e438fc42539f279e05ef9cfa9 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 15:49:12 +0300 Subject: [PATCH 071/126] CmsKit - Test fix --- .../Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs index af8531425f..e909cd682c 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs @@ -1,5 +1,6 @@ using Shouldly; using System; +using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Modularity; using Xunit; @@ -30,7 +31,7 @@ namespace Volo.CmsKit.Blogs [Fact] public async Task GetListAsync_ShouldWorkProperly_WithBlogIdWithFeatureNames() { - var result = await blogFeatureRepository.GetListAsync(testData.Blog_Id, new[] { testData.BlogFeature_1_FeatureName }); + var result = await blogFeatureRepository.GetListAsync(testData.Blog_Id, new List { testData.BlogFeature_1_FeatureName }); result.ShouldNotBeNull(); result.ShouldNotBeEmpty(); From 0d16202842a3549959237d5a1cb6b8ff5ba9e967 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 15:51:49 +0300 Subject: [PATCH 072/126] CmsKit - Fix tests --- .../Blogs/BlogFeatureAdminAppService_Test.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs index bc310ca681..5369a910d5 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs @@ -21,7 +21,7 @@ namespace Volo.CmsKit.Blogs [Fact] public async Task SetAsync_ShouldWorkProperly_WithNonExistingFeature() { - var dto = new BlogFeatureDto + var dto = new BlogFeatureInputDto { FeatureName = "My.Awesome.Feature", Enabled = true @@ -39,7 +39,7 @@ namespace Volo.CmsKit.Blogs [Fact] public async Task SetAsync_ShouldWorkProperly_WithExistingFeature() { - var dto = new BlogFeatureDto + var dto = new BlogFeatureInputDto { FeatureName = testData.BlogFeature_2_FeatureName, Enabled = !testData.BlogFeature_2_Enabled From f03b3eed21d2e84957b21a9a6f6aa47087d38c15 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 18 Feb 2021 17:39:26 +0300 Subject: [PATCH 073/126] CmsKit - Fix Blogs Test-cases --- .../Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs | 2 +- .../CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index 3e0df0b683..24b4cfafde 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -38,7 +38,7 @@ namespace Volo.CmsKit.Admin.Blogs if (blogFeature == null) { var newBlogFeature = new BlogFeature(blogId, dto.FeatureName, dto.Enabled); - await BlogFeatureRepository.InsertAsync(blogFeature); + await BlogFeatureRepository.InsertAsync(newBlogFeature); } else { diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index ffcd4ecf04..85f56f5e17 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -32,7 +32,6 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Destination); CreateMap(); - CreateMap(); CreateMap(MemberList.Destination); From 395fa00ae650f23cddad30bcf229720023e2f8e9 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 18 Feb 2021 17:54:35 +0300 Subject: [PATCH 074/126] rename page public app service type. --- ...{IPageAppService.cs => IPagePublicAppService.cs} | 2 +- .../CmsKit/Public/Pages/PagePublicAppService.cs | 2 +- .../CmsKit/Public/Pages/PagesPublicController.cs | 13 ++++++++----- .../Controllers/PageController.cs | 4 ++-- .../Components/Pages/DefaultPageViewComponent.cs | 4 ++-- .../Pages/PagePublicAppService_Tests.cs | 4 ++-- 6 files changed, 16 insertions(+), 13 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/{IPageAppService.cs => IPagePublicAppService.cs} (79%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs similarity index 79% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs index 7363d32a3c..d249fef9b0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs @@ -3,7 +3,7 @@ using JetBrains.Annotations; namespace Volo.CmsKit.Public.Pages { - public interface IPageAppService + public interface IPagePublicAppService { Task FindByUrlAsync([NotNull] string url); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs index bb2d1c5a70..c8da8f33aa 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs @@ -3,7 +3,7 @@ using Volo.CmsKit.Pages; namespace Volo.CmsKit.Public.Pages { - public class PagePublicAppService : CmsKitPublicAppServiceBase, IPageAppService + public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppService { protected readonly IPageRepository PageRepository; diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs index a9c6cd70e4..b56d8b6ec1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs @@ -1,24 +1,27 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp; +using Volo.Abp.GlobalFeatures; +using Volo.CmsKit.GlobalFeatures; namespace Volo.CmsKit.Public.Pages { + [RequiresGlobalFeature(typeof(PagesFeature))] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [Area("cms-kit")] - [Route("api/cms-kit-public/comments")] - public class PagesPublicController : IPageAppService + [Route("api/cms-kit-public/pages")] + public class PagesPublicController : IPagePublicAppService { - protected readonly IPageAppService PageAppService; + protected IPagePublicAppService PageAppService { get; } - public PagesPublicController(IPageAppService pageAppService) + public PagesPublicController(IPagePublicAppService pageAppService) { PageAppService = pageAppService; } [HttpGet] [Route("url/{url}")] - public Task FindByUrlAsync(string url) + public virtual Task FindByUrlAsync(string url) { return PageAppService.FindByUrlAsync(url); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs index 5d3d5acc9c..d6419bb903 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs @@ -14,9 +14,9 @@ namespace Volo.CmsKit.Public.Web.Controllers [RequiresGlobalFeature(typeof(PagesFeature))] public class PageController : CmsKitPublicControllerBase { - protected IPageAppService PageAppService { get; } + protected IPagePublicAppService PageAppService { get; } - public PageController(IPageAppService pageAppService) + public PageController(IPagePublicAppService pageAppService) { PageAppService = pageAppService; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs index c3e02b1f90..efa37f6611 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs @@ -9,9 +9,9 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages [ViewComponent(Name = "CmsDefaultPage")] public class DefaultPageViewComponent : AbpViewComponent { - protected readonly IPageAppService PageAppService; + protected readonly IPagePublicAppService PageAppService; - public DefaultPageViewComponent(IPageAppService pageAppService) + public DefaultPageViewComponent(IPagePublicAppService pageAppService) { PageAppService = pageAppService; } diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs index c0943a1279..5da1780b64 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs @@ -9,12 +9,12 @@ namespace Volo.CmsKit.Pages public class PagePublicAppService_Tests : CmsKitApplicationTestBase { private readonly CmsKitTestData _data; - private readonly IPageAppService _pageAppService; + private readonly IPagePublicAppService _pageAppService; public PagePublicAppService_Tests() { _data = GetRequiredService(); - _pageAppService = GetRequiredService(); + _pageAppService = GetRequiredService(); } [Fact] From 9273f9c8a8e982c6b289d64fdf7193dab30da693 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 19 Feb 2021 10:38:13 +0800 Subject: [PATCH 075/126] Remove email settings from the appsettings.json files --- .../EmailSettingGroupViewComponent.razor.cs | 2 +- .../appsettings.json | 11 ----------- .../appsettings.json | 11 ----------- .../appsettings.json | 11 ----------- .../MyCompanyName.MyProjectName.Web/appsettings.json | 11 ----------- 5 files changed, 1 insertion(+), 45 deletions(-) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs index e88d9cdf3b..0836aa88a9 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement.EmailSetting { await EmailSettingsAppService.UpdateAsync(ObjectMapper.Map(EmailSettings)); - await UiMessageService.Success(L["SavedSuccessfully"]); + await UiMessageService.Success(L["SuccessfullySaved"]); } } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json index 12bd4f78bb..33a3d0140a 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json @@ -16,16 +16,5 @@ }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" - }, - "Settings": { - "Abp.Mailing.Smtp.Host": "127.0.0.1", - "Abp.Mailing.Smtp.Port": "25", - "Abp.Mailing.Smtp.UserName": "", - "Abp.Mailing.Smtp.Password": "", - "Abp.Mailing.Smtp.Domain": "", - "Abp.Mailing.Smtp.EnableSsl": "false", - "Abp.Mailing.Smtp.UseDefaultCredentials": "true", - "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", - "Abp.Mailing.DefaultFromDisplayName": "ABP application" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json index 73d80aeec4..df8977967b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json @@ -15,16 +15,5 @@ }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" - }, - "Settings": { - "Abp.Mailing.Smtp.Host": "127.0.0.1", - "Abp.Mailing.Smtp.Port": "25", - "Abp.Mailing.Smtp.UserName": "", - "Abp.Mailing.Smtp.Password": "", - "Abp.Mailing.Smtp.Domain": "", - "Abp.Mailing.Smtp.EnableSsl": "false", - "Abp.Mailing.Smtp.UseDefaultCredentials": "true", - "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", - "Abp.Mailing.DefaultFromDisplayName": "ABP application" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json index 0e667e5d73..ced2b70f07 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json @@ -12,16 +12,5 @@ }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" - }, - "Settings": { - "Abp.Mailing.Smtp.Host": "127.0.0.1", - "Abp.Mailing.Smtp.Port": "25", - "Abp.Mailing.Smtp.UserName": "", - "Abp.Mailing.Smtp.Password": "", - "Abp.Mailing.Smtp.Domain": "", - "Abp.Mailing.Smtp.EnableSsl": "false", - "Abp.Mailing.Smtp.UseDefaultCredentials": "true", - "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", - "Abp.Mailing.DefaultFromDisplayName": "ABP application" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json index 9c81e66699..f6f012fcfb 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json @@ -11,16 +11,5 @@ }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" - }, - "Settings": { - "Abp.Mailing.Smtp.Host": "127.0.0.1", - "Abp.Mailing.Smtp.Port": "25", - "Abp.Mailing.Smtp.UserName": "", - "Abp.Mailing.Smtp.Password": "", - "Abp.Mailing.Smtp.Domain": "", - "Abp.Mailing.Smtp.EnableSsl": "false", - "Abp.Mailing.Smtp.UseDefaultCredentials": "true", - "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", - "Abp.Mailing.DefaultFromDisplayName": "ABP application" } } From c1aa7525a5fa478b9dc6c9bfda10ce940c9c2b79 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 19 Feb 2021 15:17:14 +0800 Subject: [PATCH 076/126] Make RegisterDto of account module extensible. --- .../Volo/Abp/Account/RegisterDto.cs | 5 +++-- .../Volo/Abp/Account/AccountAppService.cs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/RegisterDto.cs b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/RegisterDto.cs index b69383d26f..ed2697a8d8 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/RegisterDto.cs +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/RegisterDto.cs @@ -1,11 +1,12 @@ using System.ComponentModel.DataAnnotations; using Volo.Abp.Auditing; using Volo.Abp.Identity; +using Volo.Abp.ObjectExtending; using Volo.Abp.Validation; namespace Volo.Abp.Account { - public class RegisterDto + public class RegisterDto : ExtensibleObject { [Required] [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxUserNameLength))] @@ -25,4 +26,4 @@ namespace Volo.Abp.Account [Required] public string AppName { get; set; } } -} \ No newline at end of file +} diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs index 731c64fc52..05ff98b35b 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs @@ -6,6 +6,7 @@ using Volo.Abp.Account.Localization; using Volo.Abp.Account.Settings; using Volo.Abp.Application.Services; using Volo.Abp.Identity; +using Volo.Abp.ObjectExtending; using Volo.Abp.Settings; namespace Volo.Abp.Account @@ -42,6 +43,8 @@ namespace Volo.Abp.Account var user = new IdentityUser(GuidGenerator.Create(), input.UserName, input.EmailAddress, CurrentTenant.Id); + input.MapExtraPropertiesTo(user); + (await UserManager.CreateAsync(user, input.Password)).CheckErrors(); await UserManager.SetEmailAsync(user,input.EmailAddress); From 2732cf9b34ec446b7fbfd79594d5c48fecad5d3a Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Fri, 19 Feb 2021 12:05:01 +0300 Subject: [PATCH 077/126] rename url property to slug. --- .../20210219084931_PageSlugChange.Designer.cs | 1960 +++++++++ .../20210219084931_PageSlugChange.cs | 46 + .../UnifiedDbContextModelSnapshot.cs | 3845 +++++++++-------- .../CmsKit/Admin/Pages/CreatePageInputDto.cs | 4 +- .../Volo/CmsKit/Admin/Pages/PageDto.cs | 2 +- .../CmsKit/Admin/Pages/UpdatePageInputDto.cs | 4 +- .../CmsKit/Admin/Pages/PageAdminAppService.cs | 17 +- .../Volo/CmsKit/CmsKitErrorCodes.cs | 2 +- .../CmsKit/Localization/Resources/en.json | 4 +- .../Volo/CmsKit/Pages/PageConsts.cs | 2 +- .../Volo/CmsKit/Pages/IPageRepository.cs | 6 +- .../Volo/CmsKit/Pages/Page.cs | 10 +- .../Pages/PageSlugAlreadyExistsException.cs | 23 + .../Pages/PageUrlAlreadyExistException.cs | 23 - .../CmsKitDbContextModelCreatingExtensions.cs | 4 +- .../Volo/CmsKit/Pages/EfCorePageRepository.cs | 12 +- .../MongoDB/Pages/MongoPageRepository.cs | 12 +- .../Public/Pages/IPagePublicAppService.cs | 2 +- .../Volo/CmsKit/Public/Pages/PageDto.cs | 2 +- .../Public/Pages/PagePublicAppService.cs | 4 +- .../Public/Pages/PagesPublicController.cs | 6 +- .../CmsKitPublicWebModule.cs | 2 +- .../Pages/CmsKit/Pages/Index.cshtml.cs | 10 +- .../Pages/DefaultPageViewComponent.cs | 6 +- .../Blogs/BlogPostAdminAppService_Tests.cs | 2 +- .../Pages/PageAdminAppService_Tests.cs | 18 +- .../Pages/PagePublicAppService_Tests.cs | 4 +- .../CmsKitDataSeedContributor.cs | 4 +- .../Volo.CmsKit.TestBase/CmsKitTestData.cs | 4 +- .../Pages/PageRepository_Test.cs | 8 +- 30 files changed, 4063 insertions(+), 1985 deletions(-) create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.Designer.cs create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/PageSlugAlreadyExistsException.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/PageUrlAlreadyExistException.cs diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.Designer.cs new file mode 100644 index 0000000000..9fc5a2cc5e --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.Designer.cs @@ -0,0 +1,1960 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + [Migration("20210219084931_PageSlugChange")] + partial class PageSlugChange + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.3") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + 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.BlobStoring.Database.DatabaseBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .HasMaxLength(2147483647) + .HasColumnType("varbinary(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ContainerId"); + + b.HasIndex("TenantId", "ContainerId", "Name"); + + b.ToTable("AbpBlobs"); + }); + + modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AbpBlobContainers"); + }); + + 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.CmsKit.Blogs.Blog", 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.Property("Slug") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsBlogs"); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .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("ShortDescription") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.HasIndex("DeleterId"); + + b.HasIndex("LastModifierId"); + + b.HasIndex("Slug", "BlogId"); + + b.ToTable("CmsBlogPosts"); + }); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments"); + }); + + modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsContents"); + }); + + modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", 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("MimeType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Size") + .HasMaxLength(2147483647) + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsMediaDescriptors"); + }); + + modelBuilder.Entity("Volo.CmsKit.Pages.Page", 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(512) + .HasColumnType("nvarchar(512)"); + + 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("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Slug"); + + b.ToTable("CmsPages"); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReactionName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); + + b.ToTable("CmsUserReactions"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + 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("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers"); + }); + + 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.BlobStoring.Database.DatabaseBlob", b => + { + b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) + .WithMany() + .HasForeignKey("ContainerId") + .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.CmsKit.Blogs.BlogPost", b => + { + b.HasOne("Volo.CmsKit.Users.CmsUser", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.HasOne("Volo.CmsKit.Users.CmsUser", "Deleter") + .WithMany() + .HasForeignKey("DeleterId"); + + b.HasOne("Volo.CmsKit.Users.CmsUser", "LastModifier") + .WithMany() + .HasForeignKey("LastModifierId"); + + b.Navigation("Creator"); + + b.Navigation("Deleter"); + + b.Navigation("LastModifier"); + }); + + 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.cs new file mode 100644 index 0000000000..e3d6762213 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.cs @@ -0,0 +1,46 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Volo.CmsKit.Migrations +{ + public partial class PageSlugChange : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "CmsPages", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + 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_CmsPages", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_CmsPages_TenantId_Slug", + table: "CmsPages", + columns: new[] { "TenantId", "Slug" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "CmsPages"); + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 80080860e9..4d475d038f 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -1,1887 +1,1958 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - partial class UnifiedDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.3") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .HasMaxLength(2147483647) - .HasColumnType("varbinary(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("TenantId", "ContainerId", "Name"); - - b.ToTable("AbpBlobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers"); - }); - - 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.CmsKit.Blogs.Blog", 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.Property("Slug") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsBlogs"); - }); - - modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("BlogId") - .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("ShortDescription") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("CreatorId"); - - b.HasIndex("DeleterId"); - - b.HasIndex("LastModifierId"); - - b.HasIndex("Slug", "BlogId"); - - b.ToTable("CmsBlogPosts"); - }); - - modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2147483647) - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsContents"); - }); - - modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", 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("MimeType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("Size") - .HasMaxLength(2147483647) - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsMediaDescriptors"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReactionName") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => - { - b.Property("EntityId") - .HasColumnType("nvarchar(450)"); - - b.Property("TagId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("EntityId", "TagId"); - - b.HasIndex("TenantId", "EntityId", "TagId"); - - b.ToTable("CmsEntityTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("CmsTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - 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("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .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.CmsKit.Blogs.BlogPost", b => - { - b.HasOne("Volo.CmsKit.Users.CmsUser", "Creator") - .WithMany() - .HasForeignKey("CreatorId"); - - b.HasOne("Volo.CmsKit.Users.CmsUser", "Deleter") - .WithMany() - .HasForeignKey("DeleterId"); - - b.HasOne("Volo.CmsKit.Users.CmsUser", "LastModifier") - .WithMany() - .HasForeignKey("LastModifierId"); - - b.Navigation("Creator"); - - b.Navigation("Deleter"); - - b.Navigation("LastModifier"); - }); - - 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 - } - } -} +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + partial class UnifiedDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.3") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + 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.BlobStoring.Database.DatabaseBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .HasMaxLength(2147483647) + .HasColumnType("varbinary(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ContainerId"); + + b.HasIndex("TenantId", "ContainerId", "Name"); + + b.ToTable("AbpBlobs"); + }); + + modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AbpBlobContainers"); + }); + + 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.CmsKit.Blogs.Blog", 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.Property("Slug") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsBlogs"); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .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("ShortDescription") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.HasIndex("DeleterId"); + + b.HasIndex("LastModifierId"); + + b.HasIndex("Slug", "BlogId"); + + b.ToTable("CmsBlogPosts"); + }); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments"); + }); + + modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsContents"); + }); + + modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", 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("MimeType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Size") + .HasMaxLength(2147483647) + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsMediaDescriptors"); + }); + + modelBuilder.Entity("Volo.CmsKit.Pages.Page", 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(512) + .HasColumnType("nvarchar(512)"); + + 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("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Slug"); + + b.ToTable("CmsPages"); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReactionName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); + + b.ToTable("CmsUserReactions"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + 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("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers"); + }); + + 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.BlobStoring.Database.DatabaseBlob", b => + { + b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) + .WithMany() + .HasForeignKey("ContainerId") + .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.CmsKit.Blogs.BlogPost", b => + { + b.HasOne("Volo.CmsKit.Users.CmsUser", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.HasOne("Volo.CmsKit.Users.CmsUser", "Deleter") + .WithMany() + .HasForeignKey("DeleterId"); + + b.HasOne("Volo.CmsKit.Users.CmsUser", "LastModifier") + .WithMany() + .HasForeignKey("LastModifierId"); + + b.Navigation("Creator"); + + b.Navigation("Deleter"); + + b.Navigation("LastModifier"); + }); + + 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/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageInputDto.cs index d2ddfe6e88..c7398945dc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageInputDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageInputDto.cs @@ -12,8 +12,8 @@ namespace Volo.CmsKit.Admin.Pages public string Title { get; set; } [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] - public string Url { get; set; } + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxSlugLength))] + public string Slug { get; set; } [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] public string Description { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageDto.cs index 3aebb76b51..23b42a48dc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageDto.cs @@ -7,7 +7,7 @@ namespace Volo.CmsKit.Admin.Pages { public string Title { get; set; } - public string Url { get; set; } + public string Slug { get; set; } public string Description { get; set; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageInputDto.cs index 17b3c948bd..4dba6faac0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageInputDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageInputDto.cs @@ -12,8 +12,8 @@ namespace Volo.CmsKit.Admin.Pages public string Title { get; set; } [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] - public string Url { get; set; } + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxSlugLength))] + public string Slug { get; set; } [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] public string Description { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs index ce0a57800b..82ddd6d77e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using AutoMapper; using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; using Volo.Abp.GlobalFeatures; @@ -47,9 +48,9 @@ namespace Volo.CmsKit.Admin.Pages [Authorize(CmsKitAdminPermissions.Pages.Create)] public virtual async Task CreateAsync(CreatePageInputDto input) { - await CheckPageUrlAsync(input.Url); + await CheckPageSlugAsync(input.Slug); - var page = new Page(GuidGenerator.Create(), input.Title, input.Url, input.Description, CurrentTenant?.Id); + var page = new Page(GuidGenerator.Create(), input.Title, input.Slug, input.Description, CurrentTenant?.Id); await PageRepository.InsertAsync(page); @@ -61,13 +62,13 @@ namespace Volo.CmsKit.Admin.Pages { var page = await PageRepository.GetAsync(id); - if (page.Url != input.Url) + if (page.Slug != input.Slug) { - await CheckPageUrlAsync(input.Url); + await CheckPageSlugAsync(input.Slug); } page.SetTitle(input.Title); - page.SetUrl(input.Url); + page.SetSlug(input.Slug); page.Description = input.Description; await PageRepository.UpdateAsync(page); @@ -81,11 +82,11 @@ namespace Volo.CmsKit.Admin.Pages await PageRepository.DeleteAsync(id); } - protected virtual async Task CheckPageUrlAsync(string url) + protected virtual async Task CheckPageSlugAsync(string slug) { - if (await PageRepository.ExistsAsync(url)) + if (await PageRepository.ExistsAsync(slug)) { - throw new PageUrlAlreadyExistException(url); + throw new PageSlugAlreadyExistsException(slug); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/CmsKitErrorCodes.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/CmsKitErrorCodes.cs index 60ed82a671..3251bcb230 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/CmsKitErrorCodes.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/CmsKitErrorCodes.cs @@ -12,7 +12,7 @@ public static class Pages { - public const string UrlAlreadyExist = "CmsKit:Page:0001"; + public const string SlugAlreadyExist = "CmsKit:Page:0001"; } public static class Blogs diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json index 7b7dd69308..9ccf9a3817 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json @@ -3,8 +3,8 @@ "texts": { "CmsKit:0002": "Content already exists!", "CmsKit:0003": "The entity {0} is not taggable.", - "CmsKit:BlogPost:0001": "Same url slug already exists!", - "CmsKit:Page:0001": "The given url ({0}) already exists.", + "CmsKit:BlogPost:0001": "The given slug already exists!", + "CmsKit:Page:0001": "The given slug ({0}) already exists.", "CmsKit:Tag:0002": "The entity is not taggable!", "CommentAuthorizationExceptionMessage": "Those comments are not allowed for public display.", "Comments": "Comments", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs index dcafb6a466..75455b831b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs @@ -4,7 +4,7 @@ { public static int MaxTitleLength { get; set; } = 256; - public static int MaxUrlLength { get; set; } = 256; + public static int MaxSlugLength { get; set; } = 256; public static int MaxDescriptionLength { get; set; } = 512; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs index 931618f774..b5ed3f0639 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs @@ -17,10 +17,10 @@ namespace Volo.CmsKit.Pages string sorting = null, CancellationToken cancellationToken = default); - Task GetByUrlAsync(string url, CancellationToken cancellationToken = default); + Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default); - Task FindByUrlAsync(string url, CancellationToken cancellationToken = default); + Task FindBySlugAsync(string slug, CancellationToken cancellationToken = default); - Task ExistsAsync(string url, CancellationToken cancellationToken = default); + Task ExistsAsync(string slug, CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs index dc22b8c002..f56dcd10bc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs @@ -12,7 +12,7 @@ namespace Volo.CmsKit.Pages [NotNull] public virtual string Title { get; protected set; } - [NotNull] public virtual string Url { get; protected set; } + [NotNull] public virtual string Slug { get; protected set; } [CanBeNull] public virtual string Description { get; set; } @@ -20,11 +20,11 @@ namespace Volo.CmsKit.Pages { } - public Page(Guid id, [NotNull] string title, [NotNull] string url, [CanBeNull] string description = null, + public Page(Guid id, [NotNull] string title, [NotNull] string slug, [CanBeNull] string description = null, Guid? tenantId = null) : base(id) { Title = Check.NotNullOrEmpty(title, nameof(title), PageConsts.MaxTitleLength); - Url = Check.NotNullOrEmpty(url, nameof(url), PageConsts.MaxUrlLength); + Slug = Check.NotNullOrEmpty(slug, nameof(slug), PageConsts.MaxSlugLength); Description = Check.Length(description, nameof(description), PageConsts.MaxDescriptionLength); TenantId = tenantId; @@ -35,9 +35,9 @@ namespace Volo.CmsKit.Pages Title = Check.NotNullOrEmpty(title, nameof(title), PageConsts.MaxTitleLength); } - public virtual void SetUrl(string url) + public virtual void SetSlug(string slug) { - Url = Check.NotNullOrEmpty(url, nameof(url), PageConsts.MaxUrlLength); + Slug = Check.NotNullOrEmpty(slug, nameof(slug), PageConsts.MaxSlugLength); } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/PageSlugAlreadyExistsException.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/PageSlugAlreadyExistsException.cs new file mode 100644 index 0000000000..9970c67b6f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/PageSlugAlreadyExistsException.cs @@ -0,0 +1,23 @@ +using System; +using System.Runtime.Serialization; +using JetBrains.Annotations; +using Volo.Abp; + +namespace Volo.CmsKit.Pages +{ + [Serializable] + public class PageSlugAlreadyExistsException : BusinessException + { + public PageSlugAlreadyExistsException([NotNull] string slug) + { + Code = CmsKitErrorCodes.Pages.SlugAlreadyExist; + WithData(nameof(Page.Slug), slug); + } + + public PageSlugAlreadyExistsException(SerializationInfo serializationInfo, StreamingContext context) + : base(serializationInfo, context) + { + + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/PageUrlAlreadyExistException.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/PageUrlAlreadyExistException.cs deleted file mode 100644 index 142d03c441..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/PageUrlAlreadyExistException.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Runtime.Serialization; -using JetBrains.Annotations; -using Volo.Abp; - -namespace Volo.CmsKit.Pages -{ - [Serializable] - public class PageUrlAlreadyExistException : BusinessException - { - public PageUrlAlreadyExistException([NotNull] string url) - { - Code = CmsKitErrorCodes.Pages.UrlAlreadyExist; - WithData(nameof(Page.Url), url); - } - - public PageUrlAlreadyExistException(SerializationInfo serializationInfo, StreamingContext context) - : base(serializationInfo, context) - { - - } - } -} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs index 9f0ac813fc..c41875e7bb 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs @@ -178,10 +178,10 @@ namespace Volo.CmsKit.EntityFrameworkCore b.ConfigureByConvention(); b.Property(x => x.Title).IsRequired().HasMaxLength(PageConsts.MaxTitleLength); - b.Property(x => x.Url).IsRequired().HasMaxLength(PageConsts.MaxUrlLength); + b.Property(x => x.Slug).IsRequired().HasMaxLength(PageConsts.MaxSlugLength); b.Property(x => x.Description).HasMaxLength(PageConsts.MaxDescriptionLength); - b.HasIndex(x => new { x.TenantId, x.Url }); + b.HasIndex(x => new { x.TenantId, Url = x.Slug }); }); } else diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs index c51a51c632..3c213d98b3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs @@ -43,19 +43,19 @@ namespace Volo.CmsKit.Pages .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual Task GetByUrlAsync(string url, CancellationToken cancellationToken = default) + public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) { - return GetAsync(x => x.Url == url, cancellationToken: GetCancellationToken(cancellationToken)); + return GetAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } - public virtual Task FindByUrlAsync(string url, CancellationToken cancellationToken = default) + public virtual Task FindBySlugAsync(string slug, CancellationToken cancellationToken = default) { - return FindAsync(x => x.Url == url, cancellationToken: GetCancellationToken(cancellationToken)); + return FindAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } - public virtual async Task ExistsAsync(string url, CancellationToken cancellationToken = default) + public virtual async Task ExistsAsync(string slug, CancellationToken cancellationToken = default) { - return await (await GetDbSetAsync()).AnyAsync(x => x.Url == url, GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()).AnyAsync(x => x.Slug == slug, GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs index af72da56c8..66147d0e6d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs @@ -51,19 +51,19 @@ namespace Volo.CmsKit.MongoDB.Pages .ToListAsync(cancellation); } - public virtual Task GetByUrlAsync(string url, CancellationToken cancellationToken = default) + public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) { - return GetAsync(x => x.Url == url, cancellationToken: GetCancellationToken(cancellationToken)); + return GetAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } - public virtual Task FindByUrlAsync(string url, CancellationToken cancellationToken = default) + public virtual Task FindBySlugAsync(string slug, CancellationToken cancellationToken = default) { - return FindAsync(x => x.Url == url, cancellationToken: GetCancellationToken(cancellationToken)); + return FindAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } - public virtual async Task ExistsAsync(string url, CancellationToken cancellationToken = default) + public virtual async Task ExistsAsync(string slug, CancellationToken cancellationToken = default) { - return await (await GetMongoQueryableAsync(cancellationToken)).AnyAsync(x => x.Url == url, GetCancellationToken(cancellationToken)); + return await (await GetMongoQueryableAsync(cancellationToken)).AnyAsync(x => x.Slug == slug, GetCancellationToken(cancellationToken)); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs index d249fef9b0..1e37e92b71 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs @@ -5,6 +5,6 @@ namespace Volo.CmsKit.Public.Pages { public interface IPagePublicAppService { - Task FindByUrlAsync([NotNull] string url); + Task FindBySlugAsync([NotNull] string slug); } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/PageDto.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/PageDto.cs index ab8ee9ee80..19a3664578 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/PageDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/PageDto.cs @@ -7,6 +7,6 @@ namespace Volo.CmsKit.Public.Pages { public string Title { get; set; } - public string Url { get; set; } + public string Slug { get; set; } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs index fe8e8c6638..6f93c938e9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs @@ -12,10 +12,10 @@ namespace Volo.CmsKit.Public.Pages PageRepository = pageRepository; } - public virtual async Task FindByUrlAsync(string url) + public virtual async Task FindBySlugAsync(string slug) { PageDto pageDto = null; - var page = await PageRepository.FindByUrlAsync(url); + var page = await PageRepository.FindBySlugAsync(slug); if (page !=null) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs index b56d8b6ec1..970e6b1847 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs @@ -20,10 +20,10 @@ namespace Volo.CmsKit.Public.Pages } [HttpGet] - [Route("url/{url}")] - public virtual Task FindByUrlAsync(string url) + [Route("{slug}")] + public virtual Task FindBySlugAsync(string slug) { - return PageAppService.FindByUrlAsync(url); + return PageAppService.FindBySlugAsync(slug); } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs index 87f0e34bc9..fe30d70b50 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs @@ -63,7 +63,7 @@ namespace Volo.CmsKit.Public.Web { Configure(options => { - options.Conventions.AddPageRoute("/CmsKit/Pages/Index", @"/pages/{pageUrl:minlength(1)}"); + options.Conventions.AddPageRoute("/CmsKit/Pages/Index", @"/pages/{slug:minlength(1)}"); }); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs index 5443608845..155a85d94f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs @@ -8,20 +8,20 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Pages public class IndexModel : CommonPageModel { [BindProperty(SupportsGet = true)] - public string PageUrl { get; set; } + public string Slug { get; set; } - protected readonly IPageAppService PageAppService; + protected IPagePublicAppService PagePublicAppService { get; } public PageDto Page; - public IndexModel(IPageAppService pageAppService) + public IndexModel(IPagePublicAppService pagePublicAppService) { - PageAppService = pageAppService; + PagePublicAppService = pagePublicAppService; } public async Task OnGetAsync() { - Page = await PageAppService.FindByUrlAsync(PageUrl); + Page = await PagePublicAppService.FindBySlugAsync(Slug); if (Page == null) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs index efa37f6611..c972643359 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs @@ -9,11 +9,11 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages [ViewComponent(Name = "CmsDefaultPage")] public class DefaultPageViewComponent : AbpViewComponent { - protected readonly IPagePublicAppService PageAppService; + protected IPagePublicAppService PagePublicAppService { get; } - public DefaultPageViewComponent(IPagePublicAppService pageAppService) + public DefaultPageViewComponent(IPagePublicAppService pagePublicAppService) { - PageAppService = pageAppService; + PagePublicAppService = pagePublicAppService; } public virtual async Task InvokeAsync(Guid pageId, string title, string description) diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs index 6516e3fc2c..abc6ea54b9 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs @@ -114,7 +114,7 @@ namespace Volo.CmsKit.Blogs { var nonExistingSlug = "any-other-url"; var exception = await Should.ThrowAsync(async () => - await blogPostAdminAppService.GetBySlugAsync(nonExistingSlug, cmsKitTestData.Page_1_Url)); + await blogPostAdminAppService.GetBySlugAsync(nonExistingSlug, cmsKitTestData.Page_1_Slug)); exception.EntityType.ShouldBe(typeof(Blog)); } diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PageAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PageAdminAppService_Tests.cs index 7fa0d934fb..1dfbc0fe02 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PageAdminAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PageAdminAppService_Tests.cs @@ -64,12 +64,12 @@ namespace Volo.CmsKit.Pages var dto = new CreatePageInputDto { Title = "test", - Url = "test-url" + Slug = "test-url" }; await Should.NotThrowAsync(async () => await _pageAdminAppService.CreateAsync(dto)); - var page = await _pageRepository.GetByUrlAsync(dto.Url); + var page = await _pageRepository.GetBySlugAsync(dto.Slug); page.Title.ShouldBe(dto.Title); } @@ -80,12 +80,12 @@ namespace Volo.CmsKit.Pages var dto = new CreatePageInputDto { Title = "test", - Url = _data.Page_1_Url + Slug = _data.Page_1_Slug }; - var exception = await Should.ThrowAsync(async () => await _pageAdminAppService.CreateAsync(dto)); + var exception = await Should.ThrowAsync(async () => await _pageAdminAppService.CreateAsync(dto)); - exception.Code.ShouldBe(CmsKitErrorCodes.Pages.UrlAlreadyExist); + exception.Code.ShouldBe(CmsKitErrorCodes.Pages.SlugAlreadyExist); } [Fact] @@ -95,7 +95,7 @@ namespace Volo.CmsKit.Pages { Title = _data.Page_1_Title + "++", Description = "new description", - Url = _data.Page_1_Url+ "test" + Slug = _data.Page_1_Slug+ "test" }; await Should.NotThrowAsync(async () => await _pageAdminAppService.UpdateAsync(_data.Page_1_Id, dto)); @@ -105,8 +105,8 @@ namespace Volo.CmsKit.Pages updatedPage.Title.ShouldNotBe(_data.Page_1_Title); updatedPage.Title.ShouldBe(dto.Title); - updatedPage.Url.ShouldNotBe(_data.Page_1_Url); - updatedPage.Url.ShouldBe(dto.Url); + updatedPage.Slug.ShouldNotBe(_data.Page_1_Slug); + updatedPage.Slug.ShouldBe(dto.Slug); updatedPage.Description.ShouldNotBe(_data.Page_1_Description); updatedPage.Description.ShouldBe(dto.Description); @@ -119,7 +119,7 @@ namespace Volo.CmsKit.Pages { Title = _data.Page_1_Title + "++", Description = "new description", - Url = _data.Page_2_Url + Slug = _data.Page_2_Slug }; await Should.ThrowAsync(async () => await _pageAdminAppService.UpdateAsync(_data.Page_1_Id, dto)); diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs index 5da1780b64..6b16e35f41 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs @@ -20,7 +20,7 @@ namespace Volo.CmsKit.Pages [Fact] public async Task ShouldFindByUrlAsync() { - var page = await _pageAppService.FindByUrlAsync(_data.Page_1_Url); + var page = await _pageAppService.FindBySlugAsync(_data.Page_1_Slug); page.ShouldNotBeNull(); page.Title.ShouldBe(_data.Page_1_Title); @@ -29,7 +29,7 @@ namespace Volo.CmsKit.Pages [Fact] public async Task ShouldNotGetByUrlAsync() { - var page = await _pageAppService.FindByUrlAsync("not-exist-url"); + var page = await _pageAppService.FindBySlugAsync("not-exist-url"); page.ShouldBeNull(); } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs index 68a65de89e..27a6681478 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs @@ -305,13 +305,13 @@ namespace Volo.CmsKit private async Task SeedPagesAsync() { - var page1 = new Page(_cmsKitTestData.Page_1_Id, _cmsKitTestData.Page_1_Title, _cmsKitTestData.Page_1_Url, _cmsKitTestData.Page_1_Description); + var page1 = new Page(_cmsKitTestData.Page_1_Id, _cmsKitTestData.Page_1_Title, _cmsKitTestData.Page_1_Slug, _cmsKitTestData.Page_1_Description); var page1Content = new Content(_guidGenerator.Create(), nameof(Page), page1.Id.ToString(), _cmsKitTestData.Page_1_Content); await _pageRepository.InsertAsync(page1); await _contentRepository.InsertAsync(page1Content); - var page2 = new Page(_cmsKitTestData.Page_2_Id, _cmsKitTestData.Page_2_Title, _cmsKitTestData.Page_2_Url, _cmsKitTestData.Page_2_Description); + var page2 = new Page(_cmsKitTestData.Page_2_Id, _cmsKitTestData.Page_2_Title, _cmsKitTestData.Page_2_Slug, _cmsKitTestData.Page_2_Description); var page2Content = new Content(_guidGenerator.Create(), nameof(Page), page2.Id.ToString(), _cmsKitTestData.Page_2_Content); await _pageRepository.InsertAsync(page2); diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs index b0b4a5b1ba..4ef3dfe0b6 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs @@ -45,7 +45,7 @@ namespace Volo.CmsKit public string Page_1_Title { get; } = "Imagine Dragons - Believer Lyrics"; - public string Page_1_Url { get; } = "imagine-dragons-believer-lyrics"; + public string Page_1_Slug { get; } = "imagine-dragons-believer-lyrics"; public string Page_1_Description { get; } = "You can get the lyrics of the music."; @@ -55,7 +55,7 @@ namespace Volo.CmsKit public string Page_2_Title { get; } = "Imagine Dragons - Believer Lyrics (Page 2)"; - public string Page_2_Url { get; } = "imagine-dragons-believer-lyrics-2"; + public string Page_2_Slug { get; } = "imagine-dragons-believer-lyrics-2"; public string Page_2_Description { get; } = "You can get the lyrics of the music."; diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Pages/PageRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Pages/PageRepository_Test.cs index 67a691c5a8..56a5c916ab 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Pages/PageRepository_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Pages/PageRepository_Test.cs @@ -53,7 +53,7 @@ namespace Volo.CmsKit.Pages [Fact] public async Task ShouldGetByUrlAsync() { - var page = await _pageRepository.GetByUrlAsync(_cmsKitTestData.Page_1_Url); + var page = await _pageRepository.GetBySlugAsync(_cmsKitTestData.Page_1_Slug); page.ShouldNotBeNull(); page.Description.ShouldBe(_cmsKitTestData.Page_1_Description); @@ -62,7 +62,7 @@ namespace Volo.CmsKit.Pages [Fact] public async Task ShouldFindByUrlAsync() { - var page = await _pageRepository.FindByUrlAsync(_cmsKitTestData.Page_1_Url); + var page = await _pageRepository.FindBySlugAsync(_cmsKitTestData.Page_1_Slug); page.ShouldNotBeNull(); page.Description.ShouldBe(_cmsKitTestData.Page_1_Description); @@ -71,7 +71,7 @@ namespace Volo.CmsKit.Pages [Fact] public async Task ShouldNotFindByUrlAsync() { - var page = await _pageRepository.FindByUrlAsync("not-exist-lyrics"); + var page = await _pageRepository.FindBySlugAsync("not-exist-lyrics"); page.ShouldBeNull(); } @@ -79,7 +79,7 @@ namespace Volo.CmsKit.Pages [Fact] public async Task ShouldBeExistAsync() { - var page = await _pageRepository.ExistsAsync(_cmsKitTestData.Page_1_Url); + var page = await _pageRepository.ExistsAsync(_cmsKitTestData.Page_1_Slug); page.ShouldBeTrue(); } From fa0aa17de491bd25f35e96267cbfe724bc723d19 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Fri, 19 Feb 2021 14:44:58 +0300 Subject: [PATCH 078/126] initial migration added. --- .../20201224140744_Initial.Designer.cs | 1576 ------------- .../20201225120048_Added_Page.Designer.cs | 1647 -------------- .../Migrations/20201225120048_Added_Page.cs | 46 - ...0_Updated_Tag_Removed_HexColor.Designer.cs | 1643 -------------- ...1228083120_Updated_Tag_Removed_HexColor.cs | 24 - ...01231111657_Added_Blob_Storing.Designer.cs | 1725 --------------- .../20201231111657_Added_Blob_Storing.cs | 95 - .../20210209082122_UrlSlugToSlug.Designer.cs | 1891 ---------------- .../20210209082122_UrlSlugToSlug.cs | 106 - .../20210210105857_Added_Media.Designer.cs | 1889 ---------------- .../Migrations/20210210105857_Added_Media.cs | 73 - .../20210216112738_BlogFeatures.Designer.cs | 1951 ----------------- .../Migrations/20210216112738_BlogFeatures.cs | 40 - .../20210219084931_PageSlugChange.cs | 46 - ....cs => 20210219113255_Initial.Designer.cs} | 66 +- ...4_Initial.cs => 20210219113255_Initial.cs} | 241 +- .../UnifiedDbContextModelSnapshot.cs | 71 + .../Volo.CmsKit.Web.Unified.csproj | 4 + ...CmsKitAdminApplicationAutoMapperProfile.cs | 2 - 19 files changed, 377 insertions(+), 12759 deletions(-) delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201231111657_Added_Blob_Storing.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201231111657_Added_Blob_Storing.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210209082122_UrlSlugToSlug.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210209082122_UrlSlugToSlug.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210210105857_Added_Media.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210210105857_Added_Media.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.cs rename modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/{20210219084931_PageSlugChange.Designer.cs => 20210219113255_Initial.Designer.cs} (96%) rename modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/{20201224140744_Initial.cs => 20210219113255_Initial.cs} (78%) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs deleted file mode 100644 index 7ced9b3a54..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs +++ /dev/null @@ -1,1576 +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 Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20201224140744_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.1"); - - 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.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2147483647) - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsContents"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReactionName") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => - { - b.Property("EntityId") - .HasColumnType("nvarchar(450)"); - - b.Property("TagId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("EntityId", "TagId"); - - b.HasIndex("TenantId", "EntityId", "TagId"); - - b.ToTable("CmsEntityTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HexColor") - .HasMaxLength(6) - .HasColumnType("nvarchar(6)"); - - 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(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("CmsTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - 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("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs deleted file mode 100644 index 06fcbe43a4..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs +++ /dev/null @@ -1,1647 +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 Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20201225120048_Added_Page")] - partial class Added_Page - { - 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.1"); - - 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.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2147483647) - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsContents"); - }); - - modelBuilder.Entity("Volo.CmsKit.Pages.Page", 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(515) - .HasColumnType("nvarchar(515)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Url"); - - b.ToTable("CmsPages"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReactionName") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => - { - b.Property("EntityId") - .HasColumnType("nvarchar(450)"); - - b.Property("TagId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("EntityId", "TagId"); - - b.HasIndex("TenantId", "EntityId", "TagId"); - - b.ToTable("CmsEntityTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HexColor") - .HasMaxLength(6) - .HasColumnType("nvarchar(6)"); - - 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(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("CmsTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - 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("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs deleted file mode 100644 index 119009c8e1..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class Added_Page : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "CmsPages", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(515)", maxLength: 515, nullable: true), - 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_CmsPages", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_CmsPages_TenantId_Url", - table: "CmsPages", - columns: new[] { "TenantId", "Url" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CmsPages"); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs deleted file mode 100644 index 8f90204baa..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs +++ /dev/null @@ -1,1643 +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 Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20201228083120_Updated_Tag_Removed_HexColor")] - partial class Updated_Tag_Removed_HexColor - { - 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.1"); - - 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.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2147483647) - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsContents"); - }); - - modelBuilder.Entity("Volo.CmsKit.Pages.Page", 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(515) - .HasColumnType("nvarchar(515)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Url"); - - b.ToTable("CmsPages"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReactionName") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => - { - b.Property("EntityId") - .HasColumnType("nvarchar(450)"); - - b.Property("TagId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("EntityId", "TagId"); - - b.HasIndex("TenantId", "EntityId", "TagId"); - - b.ToTable("CmsEntityTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("CmsTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - 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("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs deleted file mode 100644 index 476f4ea87e..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class Updated_Tag_Removed_HexColor : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "HexColor", - table: "CmsTags"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "HexColor", - table: "CmsTags", - type: "nvarchar(6)", - maxLength: 6, - nullable: true); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201231111657_Added_Blob_Storing.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201231111657_Added_Blob_Storing.Designer.cs deleted file mode 100644 index 15e01fa673..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201231111657_Added_Blob_Storing.Designer.cs +++ /dev/null @@ -1,1725 +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 Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20201231111657_Added_Blob_Storing")] - partial class Added_Blob_Storing - { - 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.1"); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .HasMaxLength(2147483647) - .HasColumnType("varbinary(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("TenantId", "ContainerId", "Name"); - - b.ToTable("AbpBlobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers"); - }); - - 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.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2147483647) - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsContents"); - }); - - modelBuilder.Entity("Volo.CmsKit.Pages.Page", 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(512) - .HasColumnType("nvarchar(512)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Url"); - - b.ToTable("CmsPages"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReactionName") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => - { - b.Property("EntityId") - .HasColumnType("nvarchar(450)"); - - b.Property("TagId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("EntityId", "TagId"); - - b.HasIndex("TenantId", "EntityId", "TagId"); - - b.ToTable("CmsEntityTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("CmsTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - 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("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201231111657_Added_Blob_Storing.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201231111657_Added_Blob_Storing.cs deleted file mode 100644 index 11cf1901fa..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201231111657_Added_Blob_Storing.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class Added_Blob_Storing : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Description", - table: "CmsPages", - type: "nvarchar(512)", - maxLength: 512, - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(515)", - oldMaxLength: 515, - oldNullable: true); - - migrationBuilder.CreateTable( - name: "AbpBlobContainers", - 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), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpBlobs", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ContainerId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Content = table.Column(type: "varbinary(max)", maxLength: 2147483647, 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_AbpBlobs", x => x.Id); - table.ForeignKey( - name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", - column: x => x.ContainerId, - principalTable: "AbpBlobContainers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobContainers_TenantId_Name", - table: "AbpBlobContainers", - columns: new[] { "TenantId", "Name" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobs_ContainerId", - table: "AbpBlobs", - column: "ContainerId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobs_TenantId_ContainerId_Name", - table: "AbpBlobs", - columns: new[] { "TenantId", "ContainerId", "Name" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpBlobs"); - - migrationBuilder.DropTable( - name: "AbpBlobContainers"); - - migrationBuilder.AlterColumn( - name: "Description", - table: "CmsPages", - type: "nvarchar(515)", - maxLength: 515, - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(512)", - oldMaxLength: 512, - oldNullable: true); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210209082122_UrlSlugToSlug.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210209082122_UrlSlugToSlug.Designer.cs deleted file mode 100644 index ef06bb2fd9..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210209082122_UrlSlugToSlug.Designer.cs +++ /dev/null @@ -1,1891 +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 Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20210209082122_UrlSlugToSlug")] - partial class UrlSlugToSlug - { - 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.2"); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .HasMaxLength(2147483647) - .HasColumnType("varbinary(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("TenantId", "ContainerId", "Name"); - - b.ToTable("AbpBlobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers"); - }); - - 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.CmsKit.Blogs.Blog", 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.Property("Slug") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsBlogs"); - }); - - modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("BlogId") - .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("ShortDescription") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("CreatorId"); - - b.HasIndex("DeleterId"); - - b.HasIndex("LastModifierId"); - - b.HasIndex("Slug", "BlogId"); - - b.ToTable("CmsBlogPosts"); - }); - - modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2147483647) - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsContents"); - }); - - modelBuilder.Entity("Volo.CmsKit.Pages.Page", 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(512) - .HasColumnType("nvarchar(512)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Url"); - - b.ToTable("CmsPages"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReactionName") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => - { - b.Property("EntityId") - .HasColumnType("nvarchar(450)"); - - b.Property("TagId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("EntityId", "TagId"); - - b.HasIndex("TenantId", "EntityId", "TagId"); - - b.ToTable("CmsEntityTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("CmsTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - 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("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .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.CmsKit.Blogs.BlogPost", b => - { - b.HasOne("Volo.CmsKit.Users.CmsUser", "Creator") - .WithMany() - .HasForeignKey("CreatorId"); - - b.HasOne("Volo.CmsKit.Users.CmsUser", "Deleter") - .WithMany() - .HasForeignKey("DeleterId"); - - b.HasOne("Volo.CmsKit.Users.CmsUser", "LastModifier") - .WithMany() - .HasForeignKey("LastModifierId"); - - b.Navigation("Creator"); - - b.Navigation("Deleter"); - - b.Navigation("LastModifier"); - }); - - 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210209082122_UrlSlugToSlug.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210209082122_UrlSlugToSlug.cs deleted file mode 100644 index d4ee6baf56..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210209082122_UrlSlugToSlug.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class UrlSlugToSlug : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "CmsBlogPosts", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - BlogId = table.Column(type: "uniqueidentifier", nullable: false), - Title = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ShortDescription = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - 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_CmsBlogPosts", x => x.Id); - table.ForeignKey( - name: "FK_CmsBlogPosts_CmsUsers_CreatorId", - column: x => x.CreatorId, - principalTable: "CmsUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_CmsBlogPosts_CmsUsers_DeleterId", - column: x => x.DeleterId, - principalTable: "CmsUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_CmsBlogPosts_CmsUsers_LastModifierId", - column: x => x.LastModifierId, - principalTable: "CmsUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "CmsBlogs", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Slug = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - 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_CmsBlogs", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_CmsBlogPosts_CreatorId", - table: "CmsBlogPosts", - column: "CreatorId"); - - migrationBuilder.CreateIndex( - name: "IX_CmsBlogPosts_DeleterId", - table: "CmsBlogPosts", - column: "DeleterId"); - - migrationBuilder.CreateIndex( - name: "IX_CmsBlogPosts_LastModifierId", - table: "CmsBlogPosts", - column: "LastModifierId"); - - migrationBuilder.CreateIndex( - name: "IX_CmsBlogPosts_Slug_BlogId", - table: "CmsBlogPosts", - columns: new[] { "Slug", "BlogId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CmsBlogPosts"); - - migrationBuilder.DropTable( - name: "CmsBlogs"); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210210105857_Added_Media.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210210105857_Added_Media.Designer.cs deleted file mode 100644 index 14b807eb67..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210210105857_Added_Media.Designer.cs +++ /dev/null @@ -1,1889 +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 Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20210210105857_Added_Media")] - partial class Added_Media - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.3") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .HasMaxLength(2147483647) - .HasColumnType("varbinary(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("TenantId", "ContainerId", "Name"); - - b.ToTable("AbpBlobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers"); - }); - - 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.CmsKit.Blogs.Blog", 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.Property("Slug") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsBlogs"); - }); - - modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("BlogId") - .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("ShortDescription") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("CreatorId"); - - b.HasIndex("DeleterId"); - - b.HasIndex("LastModifierId"); - - b.HasIndex("Slug", "BlogId"); - - b.ToTable("CmsBlogPosts"); - }); - - modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2147483647) - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsContents"); - }); - - modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", 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("MimeType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("Size") - .HasMaxLength(2147483647) - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsMediaDescriptors"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReactionName") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => - { - b.Property("EntityId") - .HasColumnType("nvarchar(450)"); - - b.Property("TagId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("EntityId", "TagId"); - - b.HasIndex("TenantId", "EntityId", "TagId"); - - b.ToTable("CmsEntityTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("CmsTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - 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("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .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.CmsKit.Blogs.BlogPost", b => - { - b.HasOne("Volo.CmsKit.Users.CmsUser", "Creator") - .WithMany() - .HasForeignKey("CreatorId"); - - b.HasOne("Volo.CmsKit.Users.CmsUser", "Deleter") - .WithMany() - .HasForeignKey("DeleterId"); - - b.HasOne("Volo.CmsKit.Users.CmsUser", "LastModifier") - .WithMany() - .HasForeignKey("LastModifierId"); - - b.Navigation("Creator"); - - b.Navigation("Deleter"); - - b.Navigation("LastModifier"); - }); - - 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210210105857_Added_Media.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210210105857_Added_Media.cs deleted file mode 100644 index 46abf1b3b0..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210210105857_Added_Media.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class Added_Media : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CmsPages"); - - migrationBuilder.CreateTable( - name: "CmsMediaDescriptors", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false), - MimeType = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Size = table.Column(type: "bigint", maxLength: 2147483647, 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_CmsMediaDescriptors", x => x.Id); - }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CmsMediaDescriptors"); - - migrationBuilder.CreateTable( - name: "CmsPages", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CmsPages", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_CmsPages_TenantId_Url", - table: "CmsPages", - columns: new[] { "TenantId", "Url" }); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.Designer.cs deleted file mode 100644 index c043de5396..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.Designer.cs +++ /dev/null @@ -1,1951 +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 Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20210216112738_BlogFeatures")] - partial class BlogFeatures - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.3") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("uniqueidentifier"); - - b.Property("Content") - .HasMaxLength(2147483647) - .HasColumnType("varbinary(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("TenantId", "ContainerId", "Name"); - - b.ToTable("AbpBlobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers"); - }); - - 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.CmsKit.Blogs.Blog", 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.Property("Slug") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsBlogs"); - }); - - modelBuilder.Entity("Volo.CmsKit.Blogs.BlogFeature", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("BlogId") - .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("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FeatureName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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.HasKey("Id"); - - b.ToTable("CmsBlogFeatures"); - }); - - modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("BlogId") - .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("ShortDescription") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("CreatorId"); - - b.HasIndex("DeleterId"); - - b.HasIndex("LastModifierId"); - - b.HasIndex("Slug", "BlogId"); - - b.ToTable("CmsBlogPosts"); - }); - - modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2147483647) - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsContents"); - }); - - modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", 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("MimeType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("Size") - .HasMaxLength(2147483647) - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsMediaDescriptors"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReactionName") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => - { - b.Property("EntityId") - .HasColumnType("nvarchar(450)"); - - b.Property("TagId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("EntityId", "TagId"); - - b.HasIndex("TenantId", "EntityId", "TagId"); - - b.ToTable("CmsEntityTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - 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(32) - .HasColumnType("nvarchar(32)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("CmsTags"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - 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("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .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.CmsKit.Blogs.BlogPost", b => - { - b.HasOne("Volo.CmsKit.Users.CmsUser", "Creator") - .WithMany() - .HasForeignKey("CreatorId"); - - b.HasOne("Volo.CmsKit.Users.CmsUser", "Deleter") - .WithMany() - .HasForeignKey("DeleterId"); - - b.HasOne("Volo.CmsKit.Users.CmsUser", "LastModifier") - .WithMany() - .HasForeignKey("LastModifierId"); - - b.Navigation("Creator"); - - b.Navigation("Deleter"); - - b.Navigation("LastModifier"); - }); - - 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.cs deleted file mode 100644 index 367cf1d92c..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210216112738_BlogFeatures.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class BlogFeatures : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "CmsBlogFeatures", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - BlogId = table.Column(type: "uniqueidentifier", nullable: false), - FeatureName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Enabled = 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_CmsBlogFeatures", x => x.Id); - }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CmsBlogFeatures"); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.cs deleted file mode 100644 index e3d6762213..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class PageSlugChange : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "CmsPages", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - 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_CmsPages", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_CmsPages_TenantId_Slug", - table: "CmsPages", - columns: new[] { "TenantId", "Slug" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CmsPages"); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219113255_Initial.Designer.cs similarity index 96% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.Designer.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219113255_Initial.Designer.cs index 9fc5a2cc5e..2fb20c8941 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219084931_PageSlugChange.Designer.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219113255_Initial.Designer.cs @@ -11,8 +11,8 @@ using Volo.CmsKit.EntityFrameworkCore; namespace Volo.CmsKit.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20210219084931_PageSlugChange")] - partial class PageSlugChange + [Migration("20210219113255_Initial")] + partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -1191,6 +1191,68 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsBlogs"); }); + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogFeature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .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("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeatureName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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.HasKey("Id"); + + b.ToTable("CmsBlogFeatures"); + }); + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => { b.Property("Id") diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219113255_Initial.cs similarity index 78% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219113255_Initial.cs index 826acae0d9..083f0de402 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219113255_Initial.cs @@ -39,6 +39,21 @@ namespace Volo.CmsKit.Migrations table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); }); + migrationBuilder.CreateTable( + name: "AbpBlobContainers", + 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), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpClaimTypes", columns: table => new @@ -251,6 +266,52 @@ namespace Volo.CmsKit.Migrations table.PrimaryKey("PK_AbpUsers", x => x.Id); }); + migrationBuilder.CreateTable( + name: "CmsBlogFeatures", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BlogId = table.Column(type: "uniqueidentifier", nullable: false), + FeatureName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Enabled = 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_CmsBlogFeatures", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsBlogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Slug = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + 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_CmsBlogs", x => x.Id); + }); + migrationBuilder.CreateTable( name: "CmsComments", columns: table => new @@ -306,6 +367,54 @@ namespace Volo.CmsKit.Migrations table.PrimaryKey("PK_CmsEntityTags", x => new { x.EntityId, x.TagId }); }); + migrationBuilder.CreateTable( + name: "CmsMediaDescriptors", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: false), + MimeType = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Size = table.Column(type: "bigint", maxLength: 2147483647, 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_CmsMediaDescriptors", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsPages", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + 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_CmsPages", x => x.Id); + }); + migrationBuilder.CreateTable( name: "CmsRatings", columns: table => new @@ -328,10 +437,9 @@ namespace Volo.CmsKit.Migrations columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - HexColor = table.Column(type: "nvarchar(6)", maxLength: 6, nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), 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), @@ -435,6 +543,29 @@ namespace Volo.CmsKit.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "AbpBlobs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ContainerId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Content = table.Column(type: "varbinary(max)", maxLength: 2147483647, 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_AbpBlobs", x => x.Id); + table.ForeignKey( + name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", + column: x => x.ContainerId, + principalTable: "AbpBlobContainers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "AbpOrganizationUnitRoles", columns: table => new @@ -617,6 +748,49 @@ namespace Volo.CmsKit.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "CmsBlogPosts", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BlogId = table.Column(type: "uniqueidentifier", nullable: false), + Title = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ShortDescription = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + 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_CmsBlogPosts", x => x.Id); + table.ForeignKey( + name: "FK_CmsBlogPosts_CmsUsers_CreatorId", + column: x => x.CreatorId, + principalTable: "CmsUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_CmsBlogPosts_CmsUsers_DeleterId", + column: x => x.DeleterId, + principalTable: "CmsUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_CmsBlogPosts_CmsUsers_LastModifierId", + column: x => x.LastModifierId, + principalTable: "CmsUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "AbpEntityPropertyChanges", columns: table => new @@ -660,6 +834,21 @@ namespace Volo.CmsKit.Migrations table: "AbpAuditLogs", columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + migrationBuilder.CreateIndex( + name: "IX_AbpBlobContainers_TenantId_Name", + table: "AbpBlobContainers", + columns: new[] { "TenantId", "Name" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobs_ContainerId", + table: "AbpBlobs", + column: "ContainerId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobs_TenantId_ContainerId_Name", + table: "AbpBlobs", + columns: new[] { "TenantId", "ContainerId", "Name" }); + migrationBuilder.CreateIndex( name: "IX_AbpEntityChanges_AuditLogId", table: "AbpEntityChanges", @@ -787,6 +976,26 @@ namespace Volo.CmsKit.Migrations table: "AbpUsers", column: "UserName"); + migrationBuilder.CreateIndex( + name: "IX_CmsBlogPosts_CreatorId", + table: "CmsBlogPosts", + column: "CreatorId"); + + migrationBuilder.CreateIndex( + name: "IX_CmsBlogPosts_DeleterId", + table: "CmsBlogPosts", + column: "DeleterId"); + + migrationBuilder.CreateIndex( + name: "IX_CmsBlogPosts_LastModifierId", + table: "CmsBlogPosts", + column: "LastModifierId"); + + migrationBuilder.CreateIndex( + name: "IX_CmsBlogPosts_Slug_BlogId", + table: "CmsBlogPosts", + columns: new[] { "Slug", "BlogId" }); + migrationBuilder.CreateIndex( name: "IX_CmsComments_TenantId_EntityType_EntityId", table: "CmsComments", @@ -807,6 +1016,11 @@ namespace Volo.CmsKit.Migrations table: "CmsEntityTags", columns: new[] { "TenantId", "EntityId", "TagId" }); + migrationBuilder.CreateIndex( + name: "IX_CmsPages_TenantId_Slug", + table: "CmsPages", + columns: new[] { "TenantId", "Slug" }); + migrationBuilder.CreateIndex( name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", table: "CmsRatings", @@ -843,6 +1057,9 @@ namespace Volo.CmsKit.Migrations migrationBuilder.DropTable( name: "AbpAuditLogActions"); + migrationBuilder.DropTable( + name: "AbpBlobs"); + migrationBuilder.DropTable( name: "AbpClaimTypes"); @@ -888,6 +1105,15 @@ namespace Volo.CmsKit.Migrations migrationBuilder.DropTable( name: "AbpUserTokens"); + migrationBuilder.DropTable( + name: "CmsBlogFeatures"); + + migrationBuilder.DropTable( + name: "CmsBlogPosts"); + + migrationBuilder.DropTable( + name: "CmsBlogs"); + migrationBuilder.DropTable( name: "CmsComments"); @@ -897,6 +1123,12 @@ namespace Volo.CmsKit.Migrations migrationBuilder.DropTable( name: "CmsEntityTags"); + migrationBuilder.DropTable( + name: "CmsMediaDescriptors"); + + migrationBuilder.DropTable( + name: "CmsPages"); + migrationBuilder.DropTable( name: "CmsRatings"); @@ -907,7 +1139,7 @@ namespace Volo.CmsKit.Migrations name: "CmsUserReactions"); migrationBuilder.DropTable( - name: "CmsUsers"); + name: "AbpBlobContainers"); migrationBuilder.DropTable( name: "AbpEntityChanges"); @@ -924,6 +1156,9 @@ namespace Volo.CmsKit.Migrations migrationBuilder.DropTable( name: "AbpUsers"); + migrationBuilder.DropTable( + name: "CmsUsers"); + migrationBuilder.DropTable( name: "AbpAuditLogs"); } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 35006d0797..b9f44c7e0c 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -1517,6 +1517,77 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsMediaDescriptors"); }); + modelBuilder.Entity("Volo.CmsKit.Pages.Page", 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(512) + .HasColumnType("nvarchar(512)"); + + 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("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Slug"); + + b.ToTable("CmsPages"); + }); + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => { b.Property("Id") diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj index 2595a1fde2..61be8d09f5 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj @@ -62,4 +62,8 @@ + + + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 2b05a0357d..aaca9e7d87 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -30,8 +30,6 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Destination) .ReverseMap(); - CreateMap(MemberList.Destination); - CreateMap(); CreateMap(MemberList.Destination); From 53b05fd74f474d095764e21efd25428181a68157 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Fri, 19 Feb 2021 14:59:23 +0300 Subject: [PATCH 079/126] content app service renaming. --- .../{IContentAppService.cs => IContentPublicAppService.cs} | 4 ++-- .../Volo/CmsKit/Public/Contents/ContentPublicAppService.cs | 2 +- .../Volo/CmsKit/Public/Contents/ContentController.cs | 6 +++--- .../Shared/Components/Contents/ContentViewComponent.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/{IContentAppService.cs => IContentPublicAppService.cs} (78%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentPublicAppService.cs similarity index 78% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentPublicAppService.cs index 6f691ceca1..df8b07cfce 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentPublicAppService.cs @@ -3,8 +3,8 @@ using Volo.CmsKit.Contents; namespace Volo.CmsKit.Public.Contents { - public interface IContentAppService + public interface IContentPublicAppService { Task GetAsync(GetContentInput input); } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs index 0fc31e1b4b..995c99c2ed 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs @@ -3,7 +3,7 @@ using Volo.CmsKit.Contents; namespace Volo.CmsKit.Public.Contents { - public class ContentPublicAppService : CmsKitAppServiceBase, IContentAppService + public class ContentPublicAppService : CmsKitPublicAppServiceBase, IContentPublicAppService { protected IContentRepository ContentRepository { get; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs index 4a348fc7bf..ab8270a2a1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs @@ -9,11 +9,11 @@ namespace Volo.CmsKit.Public.Contents [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] [Area("cms-kit")] [Route("api/cms-kit-public/contents")] - public class ContentController : CmsKitControllerBase, IContentAppService + public class ContentController : CmsKitControllerBase, IContentPublicAppService { - protected readonly IContentAppService _contentAppService; + protected readonly IContentPublicAppService _contentAppService; - public ContentController(IContentAppService contentAppService) + public ContentController(IContentPublicAppService contentAppService) { _contentAppService = contentAppService; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs index 6a2a4e5a13..70baaf4436 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs @@ -12,11 +12,11 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents public class ContentViewComponent : AbpViewComponent { private readonly IContentRenderer contentRenderer; - private readonly IContentAppService contentAppService; + private readonly IContentPublicAppService contentAppService; public ContentViewComponent( IContentRenderer contentRenderer, - IContentAppService contentAppService) + IContentPublicAppService contentAppService) { this.contentRenderer = contentRenderer; this.contentAppService = contentAppService; From fad1711fc7ff8aa38a94b8e9bc4598cfbd97ff1d Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Fri, 19 Feb 2021 17:45:46 +0300 Subject: [PATCH 080/126] property renaming and refactorings --- ...BlogFeatureEnabledColumnRename.Designer.cs | 2022 +++++++++++++++++ ...19144454_BlogFeatureEnabledColumnRename.cs | 23 + .../UnifiedDbContextModelSnapshot.cs | 6 +- .../Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs | 2 +- .../CmsKit/Admin/Blogs/BlogFeatureInputDto.cs | 2 +- .../Admin/Blogs/BlogFeatureAdminAppService.cs | 7 +- .../Volo/CmsKit/Blogs/BlogFeature.cs | 16 +- ...vider.cs => DefaultBlogFeatureProvider.cs} | 8 +- .../CmsKit/Public/Blogs/BlogFeatureDto.cs | 2 +- .../Blogs/BlogFeaturePublicAppService.cs | 7 +- .../Pages/CmsKit/Blogs/BlogPost.cshtml | 6 +- .../Blogs/BlogFeatureAdminAppService_Test.cs | 8 +- .../Blogs/BlogFeaturePublicAppService_Test.cs | 2 +- .../Blogs/BlogFeatureRepository_Test.cs | 2 +- 14 files changed, 2078 insertions(+), 35 deletions(-) create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219144454_BlogFeatureEnabledColumnRename.Designer.cs create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219144454_BlogFeatureEnabledColumnRename.cs rename modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/{DefaultDefaultBlogFeatureProvider.cs => DefaultBlogFeatureProvider.cs} (63%) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219144454_BlogFeatureEnabledColumnRename.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219144454_BlogFeatureEnabledColumnRename.Designer.cs new file mode 100644 index 0000000000..dbc62a176a --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219144454_BlogFeatureEnabledColumnRename.Designer.cs @@ -0,0 +1,2022 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + [Migration("20210219144454_BlogFeatureEnabledColumnRename")] + partial class BlogFeatureEnabledColumnRename + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.3") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + 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.BlobStoring.Database.DatabaseBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .HasMaxLength(2147483647) + .HasColumnType("varbinary(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ContainerId"); + + b.HasIndex("TenantId", "ContainerId", "Name"); + + b.ToTable("AbpBlobs"); + }); + + modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", 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("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AbpBlobContainers"); + }); + + 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.CmsKit.Blogs.Blog", 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.Property("Slug") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsBlogs"); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogFeature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .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("FeatureName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("CmsBlogFeatures"); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .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("ShortDescription") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.HasIndex("DeleterId"); + + b.HasIndex("LastModifierId"); + + b.HasIndex("Slug", "BlogId"); + + b.ToTable("CmsBlogPosts"); + }); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments"); + }); + + modelBuilder.Entity("Volo.CmsKit.Contents.Content", 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("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsContents"); + }); + + modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", 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("MimeType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Size") + .HasMaxLength(2147483647) + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsMediaDescriptors"); + }); + + modelBuilder.Entity("Volo.CmsKit.Pages.Page", 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(512) + .HasColumnType("nvarchar(512)"); + + 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("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Slug"); + + b.ToTable("CmsPages"); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReactionName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); + + b.ToTable("CmsUserReactions"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", 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("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + 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("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers"); + }); + + 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.BlobStoring.Database.DatabaseBlob", b => + { + b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) + .WithMany() + .HasForeignKey("ContainerId") + .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.CmsKit.Blogs.BlogPost", b => + { + b.HasOne("Volo.CmsKit.Users.CmsUser", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.HasOne("Volo.CmsKit.Users.CmsUser", "Deleter") + .WithMany() + .HasForeignKey("DeleterId"); + + b.HasOne("Volo.CmsKit.Users.CmsUser", "LastModifier") + .WithMany() + .HasForeignKey("LastModifierId"); + + b.Navigation("Creator"); + + b.Navigation("Deleter"); + + b.Navigation("LastModifier"); + }); + + 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/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219144454_BlogFeatureEnabledColumnRename.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219144454_BlogFeatureEnabledColumnRename.cs new file mode 100644 index 0000000000..be63651c98 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210219144454_BlogFeatureEnabledColumnRename.cs @@ -0,0 +1,23 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Volo.CmsKit.Migrations +{ + public partial class BlogFeatureEnabledColumnRename : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "Enabled", + table: "CmsBlogFeatures", + newName: "IsEnabled"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "IsEnabled", + table: "CmsBlogFeatures", + newName: "Enabled"); + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index b9f44c7e0c..98151c5569 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -1220,9 +1220,6 @@ namespace Volo.CmsKit.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("Enabled") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -1238,6 +1235,9 @@ namespace Volo.CmsKit.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("IsEnabled") + .HasColumnType("bit"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs index 4ba3d20301..ae327f25a9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs @@ -8,6 +8,6 @@ namespace Volo.CmsKit.Admin.Blogs { [NotNull] public string FeatureName { get; set; } - public bool Enabled { get; set; } + public bool IsEnabled { get; set; } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs index 0255982227..aebbc58e26 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureInputDto.cs @@ -6,6 +6,6 @@ namespace Volo.CmsKit.Admin.Blogs { [Required] public string FeatureName { get; set; } - public bool Enabled { get; set; } + public bool IsEnabled { get; set; } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index 24b4cfafde..9c6ca82852 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -4,12 +4,15 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Volo.Abp.GlobalFeatures; using Volo.CmsKit.Admin.Blogs; using Volo.CmsKit.Blogs; +using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.Permissions; namespace Volo.CmsKit.Admin.Blogs { + [RequiresGlobalFeature(typeof(BlogsFeature))] public class BlogFeatureAdminAppService : CmsKitAdminAppServiceBase, IBlogFeatureAdminAppService { protected IBlogFeatureRepository BlogFeatureRepository { get; } @@ -37,12 +40,12 @@ namespace Volo.CmsKit.Admin.Blogs var blogFeature = await BlogFeatureRepository.FindAsync(blogId, dto.FeatureName); if (blogFeature == null) { - var newBlogFeature = new BlogFeature(blogId, dto.FeatureName, dto.Enabled); + var newBlogFeature = new BlogFeature(blogId, dto.FeatureName, dto.IsEnabled); await BlogFeatureRepository.InsertAsync(newBlogFeature); } else { - blogFeature.Enabled = dto.Enabled; + blogFeature.IsEnabled = dto.IsEnabled; await BlogFeatureRepository.UpdateAsync(blogFeature); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs index a5c66f4119..8ec02a1875 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs @@ -7,19 +7,19 @@ namespace Volo.CmsKit.Blogs { public class BlogFeature : FullAuditedAggregateRoot, IEquatable { - public BlogFeature(Guid blogId, [NotNull] string featureName, bool enabled = true) - { - BlogId = blogId; - FeatureName = Check.NotNullOrWhiteSpace(featureName, nameof(featureName)); - Enabled = enabled; - } - public Guid BlogId { get; protected set; } public string FeatureName { get; protected set; } - public bool Enabled { get; set; } = true; + public bool IsEnabled { get; set; } = true; + public BlogFeature(Guid blogId, [NotNull] string featureName, bool isEnabled = true) + { + BlogId = blogId; + FeatureName = Check.NotNullOrWhiteSpace(featureName, nameof(featureName)); + IsEnabled = isEnabled; + } + public bool Equals(BlogFeature other) { return BlogId == other?.BlogId && FeatureName == other?.FeatureName; diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultDefaultBlogFeatureProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultBlogFeatureProvider.cs similarity index 63% rename from modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultDefaultBlogFeatureProvider.cs rename to modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultBlogFeatureProvider.cs index f9b2d36800..b72ea6bd72 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultDefaultBlogFeatureProvider.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultBlogFeatureProvider.cs @@ -1,22 +1,20 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; namespace Volo.CmsKit.Blogs { - public class DefaultDefaultBlogFeatureProvider : IDefaultBlogFeatureProvider, ITransientDependency + public class DefaultBlogFeatureProvider : IDefaultBlogFeatureProvider, ITransientDependency { - public Task> GetDefaultFeaturesAsync(Guid blogId) + public virtual Task> GetDefaultFeaturesAsync(Guid blogId) { return Task.FromResult(new List { new BlogFeature(blogId, BlogPostConsts.CommentsFeatureName), new BlogFeature(blogId, BlogPostConsts.ReactionsFeatureName), new BlogFeature(blogId, BlogPostConsts.RatingsFeatureName), - new BlogFeature(blogId, BlogPostConsts.RatingsFeatureName), + new BlogFeature(blogId, BlogPostConsts.TagsFeatureName), }); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs index 8fb4aa1fd5..ef12a510ff 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs @@ -6,6 +6,6 @@ namespace Volo.CmsKit.Public.Blogs public class BlogFeatureDto : EntityDto { public string FeatureName { get; set; } - public bool Enabled { get; set; } + public bool IsEnabled { get; set; } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs index e001f524ed..4bf4820edc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs @@ -36,12 +36,9 @@ namespace Volo.CmsKit.Public.Blogs private async Task GetFromDatabaseAsync(Guid blogId, string featureName) { var feature = await BlogFeatureRepository.FindAsync(blogId, featureName); - if (feature == null) - { - feature = new BlogFeature(blogId, featureName); - } + var blogFeature = feature ?? new BlogFeature(blogId, featureName); - return ObjectMapper.Map(feature); + return ObjectMapper.Map(blogFeature); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml index 763b5ac36b..4787783b68 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml @@ -35,7 +35,7 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - if (Model.ReactionsFeature?.Enabled == true) + if (Model.ReactionsFeature?.IsEnabled == true) { @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { @@ -48,7 +48,7 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - if (Model.RatingsFeature?.Enabled == true) + if (Model.RatingsFeature?.IsEnabled == true) { @await Component.InvokeAsync(typeof(RatingViewComponent), new { @@ -62,7 +62,7 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - if (Model.CommentsFeature?.Enabled == true) + if (Model.CommentsFeature?.IsEnabled == true) { @await Component.InvokeAsync(typeof(DefaultBlogPostCommentViewComponent), new { diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs index 5369a910d5..54ce2d6de5 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeatureAdminAppService_Test.cs @@ -24,7 +24,7 @@ namespace Volo.CmsKit.Blogs var dto = new BlogFeatureInputDto { FeatureName = "My.Awesome.Feature", - Enabled = true + IsEnabled = true }; await blogFeatureAdminAppService.SetAsync(testData.Blog_Id, dto); @@ -33,7 +33,7 @@ namespace Volo.CmsKit.Blogs feature.ShouldNotBeNull(); feature.BlogId.ShouldBe(testData.Blog_Id); - feature.Enabled.ShouldBe(dto.Enabled); + feature.IsEnabled.ShouldBe(dto.IsEnabled); } [Fact] @@ -42,7 +42,7 @@ namespace Volo.CmsKit.Blogs var dto = new BlogFeatureInputDto { FeatureName = testData.BlogFeature_2_FeatureName, - Enabled = !testData.BlogFeature_2_Enabled + IsEnabled = !testData.BlogFeature_2_Enabled }; await blogFeatureAdminAppService.SetAsync(testData.Blog_Id, dto); @@ -51,7 +51,7 @@ namespace Volo.CmsKit.Blogs feature.ShouldNotBeNull(); feature.BlogId.ShouldBe(testData.Blog_Id); - feature.Enabled.ShouldBe(dto.Enabled); + feature.IsEnabled.ShouldBe(dto.IsEnabled); } [Fact] diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs index fc34e8df8f..7c0980bf7d 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs @@ -37,7 +37,7 @@ namespace Volo.CmsKit.Blogs var defaultFeature = new BlogFeature(Guid.Empty, nonExistingFeatureName); result.ShouldNotBeNull(); - result.Enabled.ShouldBe(defaultFeature.Enabled); + result.IsEnabled.ShouldBe(defaultFeature.IsEnabled); } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs index e909cd682c..334489a2aa 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Blogs/BlogFeatureRepository_Test.cs @@ -45,7 +45,7 @@ namespace Volo.CmsKit.Blogs result.ShouldNotBeNull(); result.FeatureName.ShouldBe(testData.BlogFeature_1_FeatureName); - result.Enabled.ShouldBe(testData.BlogFeature_1_Enabled); + result.IsEnabled.ShouldBe(testData.BlogFeature_1_Enabled); } [Fact] From e586f8fb85cf070295b86873ae5145ef71a5c715 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Fri, 19 Feb 2021 14:59:23 +0300 Subject: [PATCH 081/126] content app service renaming. --- .../{IContentAppService.cs => IContentPublicAppService.cs} | 4 ++-- .../Volo/CmsKit/Public/Contents/ContentPublicAppService.cs | 2 +- .../Volo/CmsKit/Public/Contents/ContentController.cs | 6 +++--- .../Shared/Components/Contents/ContentViewComponent.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/{IContentAppService.cs => IContentPublicAppService.cs} (78%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentPublicAppService.cs similarity index 78% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentPublicAppService.cs index 6f691ceca1..df8b07cfce 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentPublicAppService.cs @@ -3,8 +3,8 @@ using Volo.CmsKit.Contents; namespace Volo.CmsKit.Public.Contents { - public interface IContentAppService + public interface IContentPublicAppService { Task GetAsync(GetContentInput input); } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs index 0fc31e1b4b..995c99c2ed 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs @@ -3,7 +3,7 @@ using Volo.CmsKit.Contents; namespace Volo.CmsKit.Public.Contents { - public class ContentPublicAppService : CmsKitAppServiceBase, IContentAppService + public class ContentPublicAppService : CmsKitPublicAppServiceBase, IContentPublicAppService { protected IContentRepository ContentRepository { get; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs index 4a348fc7bf..ab8270a2a1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs @@ -9,11 +9,11 @@ namespace Volo.CmsKit.Public.Contents [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] [Area("cms-kit")] [Route("api/cms-kit-public/contents")] - public class ContentController : CmsKitControllerBase, IContentAppService + public class ContentController : CmsKitControllerBase, IContentPublicAppService { - protected readonly IContentAppService _contentAppService; + protected readonly IContentPublicAppService _contentAppService; - public ContentController(IContentAppService contentAppService) + public ContentController(IContentPublicAppService contentAppService) { _contentAppService = contentAppService; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs index 6a2a4e5a13..70baaf4436 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs @@ -12,11 +12,11 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents public class ContentViewComponent : AbpViewComponent { private readonly IContentRenderer contentRenderer; - private readonly IContentAppService contentAppService; + private readonly IContentPublicAppService contentAppService; public ContentViewComponent( IContentRenderer contentRenderer, - IContentAppService contentAppService) + IContentPublicAppService contentAppService) { this.contentRenderer = contentRenderer; this.contentAppService = contentAppService; From 7fcb5121aeda73c72fc78cceb5f012f73bfbcc88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 19 Feb 2021 18:15:10 +0300 Subject: [PATCH 082/126] Should check the result of QueueBindCommands.TryPeek. --- .../Abp/RabbitMQ/RabbitMqMessageConsumer.cs | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs b/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs index f757efab64..894f68d097 100644 --- a/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs +++ b/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs @@ -90,29 +90,30 @@ namespace Volo.Abp.RabbitMQ lock (ChannelSendSyncLock) { - QueueBindCommands.TryPeek(out var command); - - switch (command.Type) + if (QueueBindCommands.TryPeek(out var command)) { - case QueueBindType.Bind: - Channel.QueueBind( - queue: Queue.QueueName, - exchange: Exchange.ExchangeName, - routingKey: command.RoutingKey - ); - break; - case QueueBindType.Unbind: - Channel.QueueUnbind( - queue: Queue.QueueName, - exchange: Exchange.ExchangeName, - routingKey: command.RoutingKey - ); - break; - default: - throw new AbpException($"Unknown {nameof(QueueBindType)}: {command.Type}"); + switch (command.Type) + { + case QueueBindType.Bind: + Channel.QueueBind( + queue: Queue.QueueName, + exchange: Exchange.ExchangeName, + routingKey: command.RoutingKey + ); + break; + case QueueBindType.Unbind: + Channel.QueueUnbind( + queue: Queue.QueueName, + exchange: Exchange.ExchangeName, + routingKey: command.RoutingKey + ); + break; + default: + throw new AbpException($"Unknown {nameof(QueueBindType)}: {command.Type}"); + } + + QueueBindCommands.TryDequeue(out command); } - - QueueBindCommands.TryDequeue(out command); } } } From 909e5c0db815bb485a08d628f992bbb6bc309279 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 22 Feb 2021 11:14:53 +0800 Subject: [PATCH 083/126] Localize login&logout text --- .../Themes/Basic/LoginDisplay.razor | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 18ebfbd4ba..312c741032 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,11 +1,16 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Authentication +@using Microsoft.Extensions.Localization +@using Volo.Abp.Localization @using Volo.Abp.Users @using Volo.Abp.MultiTenancy +@using Volo.Abp.Validation.Localization +@using global::Localization.Resources.AbpUi @inject ICurrentUser CurrentUser @inject ICurrentTenant CurrentTenant @inject IJSRuntime JsRuntime @inject NavigationManager Navigation @inject SignOutSessionStateManager SignOutManager +@inject IStringLocalizer UiLocalizer @@ -28,12 +33,12 @@ } } - Logout + @UiLocalizer["Logout"] - Log in + @UiLocalizer["Login"] @code{ From 8a3c70d13a9d339bce3e8e750de63afb96d2654e Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 22 Feb 2021 11:17:19 +0800 Subject: [PATCH 084/126] Remove unnecessary using --- .../Themes/Basic/LoginDisplay.razor | 2 -- 1 file changed, 2 deletions(-) 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 312c741032..eebfb501a5 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,9 +1,7 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Authentication @using Microsoft.Extensions.Localization -@using Volo.Abp.Localization @using Volo.Abp.Users @using Volo.Abp.MultiTenancy -@using Volo.Abp.Validation.Localization @using global::Localization.Resources.AbpUi @inject ICurrentUser CurrentUser @inject ICurrentTenant CurrentTenant From 33f45d504b1b3d4f78a7d45b9a994c198c91a744 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 22 Feb 2021 14:06:56 +0300 Subject: [PATCH 085/126] CLI CreateMigrationAndRunMigrator: check if EF Core global tool installed resolves https://github.com/abpframework/abp/issues/7800 --- .../Commands/CreateMigrationAndRunMigrator.cs | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigrator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigrator.cs index 982ef77065..b6eadd4183 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigrator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigrator.cs @@ -2,6 +2,8 @@ using System.IO; using System.Linq; using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Utils; using Volo.Abp.DependencyInjection; @@ -10,6 +12,13 @@ namespace Volo.Abp.Cli.Commands { public class CreateMigrationAndRunMigrator : IConsoleCommand, ITransientDependency { + public ILogger Logger { get; set; } + + public CreateMigrationAndRunMigrator() + { + Logger = NullLogger.Instance; + } + public virtual async Task ExecuteAsync(CommandLineArgs commandLineArgs) { if (commandLineArgs.Target.IsNullOrEmpty()) @@ -26,6 +35,8 @@ namespace Volo.Abp.Cli.Commands throw new Exception("DbMigrator is not found!"); } + await CheckAndInstallDotnetEfIfNeededAsync(); + var output = CmdHelper.RunCmdAndGetOutput($"cd \"{commandLineArgs.Target}\" && dotnet ef migrations add Initial -s \"{dbMigratorProjectPath}\""); if (output.Contains("Done.") && output.Contains("To undo this action") && output.Contains("ef migrations remove")) // Migration added successfully @@ -38,6 +49,22 @@ namespace Volo.Abp.Cli.Commands } } + private async Task CheckAndInstallDotnetEfIfNeededAsync() + { + var output = CmdHelper.RunCmdAndGetOutput("dotnet tool list -g"); + + if (output.Contains("dotnet-ef")) + { + return; + } + + Logger.LogInformation("Installing dotnet-ef tool..."); + + CmdHelper.RunCmd("dotnet tool install --global dotnet-ef"); + + Logger.LogInformation("dotnet-ef tool is installed."); + } + private string GetDbMigratorProjectPath(string dbMigrationsFolderPath) { var srcFolder = Directory.GetParent(dbMigrationsFolderPath); From da78623e83fa3fb9c29df15b58cfeaf99f4cbdd4 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 22 Feb 2021 14:06:58 +0300 Subject: [PATCH 086/126] added author information to comment return list --- .../Admin/Comments/ICommentAdminAppService.cs | 2 +- .../Admin/Comments/CommentAdminAppService.cs | 13 +++++++--- .../Admin/Comments/CommentAdminController.cs | 2 +- .../CmsKit/Comments/ICommentRepository.cs | 2 +- .../Comments/EfCoreCommentRepository.cs | 18 ++++++++++---- .../Comments/MongoCommentRepository.cs | 24 +++++++++++++++++-- .../Comments/CommentAdminAppService_Tests.cs | 4 +++- .../Comments/CommentRepository_Tests.cs | 4 ++-- 8 files changed, 54 insertions(+), 15 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs index d6903c0cc5..2bddc35a25 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/ICommentAdminAppService.cs @@ -7,7 +7,7 @@ namespace Volo.CmsKit.Admin.Comments { public interface ICommentAdminAppService : IApplicationService { - Task> GetListAsync(CommentGetListInput input); + Task> GetListAsync(CommentGetListInput input); Task GetAsync(Guid id); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs index e045f1137a..238e475f15 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; @@ -22,7 +23,7 @@ namespace Volo.CmsKit.Admin.Comments CommentRepository = commentRepository; } - public virtual async Task> GetListAsync(CommentGetListInput input) + public virtual async Task> GetListAsync(CommentGetListInput input) { var totalCount = await CommentRepository.GetCountAsync( input.Text, @@ -46,9 +47,15 @@ namespace Volo.CmsKit.Admin.Comments input.SkipCount ); - var dtos = ObjectMapper.Map, List>(comments); + var dtos = comments.Select(queryResultItem => + { + var dto = ObjectMapper.Map(queryResultItem.Comment); + dto.Author = ObjectMapper.Map(queryResultItem.Author); - return new PagedResultDto(totalCount, dtos); + return dto; + }).ToList(); + + return new PagedResultDto(totalCount, dtos); } public virtual async Task GetAsync(Guid id) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs index 9f71761235..91482d137a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs @@ -25,7 +25,7 @@ namespace Volo.CmsKit.Admin.Comments } [HttpGet] - public virtual Task> GetListAsync(CommentGetListInput input) + public virtual Task> GetListAsync(CommentGetListInput input) { return CommentAdminAppService.GetListAsync(input); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs index 6293e125b6..f6c4cfb25c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs @@ -11,7 +11,7 @@ namespace Volo.CmsKit.Comments { Task GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default); - Task> GetListAsync( + Task> GetListAsync( string filter = null, string entityType = null, string entityId = null, diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs index 1e939e7740..9be480ce11 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs @@ -43,7 +43,7 @@ namespace Volo.CmsKit.Comments return commentWithAuthor; } - public async Task> GetListAsync( + public async Task> GetListAsync( string filter = null, string entityType = null, string entityId = null, @@ -66,9 +66,19 @@ namespace Volo.CmsKit.Comments creationStartDate, creationEndDate); - return await query.OrderBy(sorting ?? "creationTime desc") - .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)); + query = query.OrderBy(sorting ?? "creationTime desc") + .PageBy(skipCount, maxResultCount); + + var query2 = from comment in query + join user in (await GetDbContextAsync()).Set() on comment.CreatorId equals user.Id + orderby comment.CreationTime + select new CommentWithAuthorQueryResultItem + { + Comment = comment, + Author = user + }; + + return await query2.ToListAsync(GetCancellationToken(cancellationToken)); } public async Task GetCountAsync( diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index 39eb8cb223..351a78333b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -11,6 +11,7 @@ using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Users; namespace Volo.CmsKit.MongoDB.Comments { @@ -41,7 +42,7 @@ namespace Volo.CmsKit.MongoDB.Comments return commentWithAuthor; } - public async Task> GetListAsync( + public async Task> GetListAsync( string filter = null, string entityType = null, string entityId = null, @@ -65,10 +66,29 @@ namespace Volo.CmsKit.MongoDB.Comments creationEndDate, cancellationToken); - return await query.OrderBy(sorting ?? "creationTime desc") + var comments = await query.OrderBy(sorting ?? "creationTime desc") .As>() .PageBy>(skipCount, maxResultCount) .ToListAsync(GetCancellationToken(cancellationToken)); + + var commentIds = comments.Select(x => x.Id).ToList(); + + var authorsQuery = from comment in (await GetMongoQueryableAsync(cancellationToken)) + join user in (await GetDbContextAsync(cancellationToken)).CmsUsers on comment.CreatorId equals user.Id + where commentIds.Contains(comment.Id) + orderby comment.CreationTime + select user; + + var authors = await authorsQuery.ToListAsync(cancellationToken); + + return comments + .Select( + comment => + new CommentWithAuthorQueryResultItem + { + Comment = comment, + Author = authors.FirstOrDefault(a => a.Id == comment.CreatorId) + }).ToList(); } public async Task GetCountAsync( diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs index e42312a97b..7c62889201 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentAdminAppService_Tests.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System.Linq; +using System.Threading.Tasks; using Shouldly; using Volo.Abp.Domain.Entities; using Volo.CmsKit.Admin.Comments; @@ -27,6 +28,7 @@ namespace Volo.CmsKit.Comments comments.TotalCount.ShouldBe(6); comments.Items.Count.ShouldBe(3); + comments.Items.Any(x => x.Author != null).ShouldBeTrue(); } [Fact] diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs index e7b36a242a..3b166834a0 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs @@ -26,7 +26,7 @@ namespace Volo.CmsKit.Comments comments.ShouldNotBeNull(); comments.Count.ShouldBe(6); - var headCommentId = comments.First(x => x.RepliedCommentId != null).RepliedCommentId; + var headCommentId = comments.First(x => x.Comment.RepliedCommentId != null).Comment.RepliedCommentId; var replies = await _commentRepository.GetListAsync(repliedCommentId: headCommentId); @@ -63,7 +63,7 @@ namespace Volo.CmsKit.Comments var list = await _commentRepository.GetListAsync(); list.Any(x=> - x.Id == _cmsKitTestData.CommentWithChildId || x.RepliedCommentId == _cmsKitTestData.CommentWithChildId) + x.Comment.Id == _cmsKitTestData.CommentWithChildId || x.Comment.RepliedCommentId == _cmsKitTestData.CommentWithChildId) .ShouldBeFalse(); } } From 37973efb459ec0615cad14b36e94168635b95a02 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 22 Feb 2021 14:07:43 +0300 Subject: [PATCH 087/126] rename CreateMigrationAndRunMigrator to CreateMigrationAndRunMigratorCommand --- .../Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs | 2 +- ...igrator.cs => CreateMigrationAndRunMigratorCommand.cs} | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/{CreateMigrationAndRunMigrator.cs => CreateMigrationAndRunMigratorCommand.cs} (89%) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs index 9208357d4a..7ee6700d43 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs @@ -40,7 +40,7 @@ namespace Volo.Abp.Cli options.Commands["translate"] = typeof(TranslateCommand); options.Commands["build"] = typeof(BuildCommand); options.Commands["bundle"] = typeof(BundleCommand); - options.Commands["create-migration-and-run-migrator"] = typeof(CreateMigrationAndRunMigrator); + options.Commands["create-migration-and-run-migrator"] = typeof(CreateMigrationAndRunMigratorCommand); }); } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigrator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigratorCommand.cs similarity index 89% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigrator.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigratorCommand.cs index b6eadd4183..3946ca35bb 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigrator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigratorCommand.cs @@ -10,13 +10,13 @@ using Volo.Abp.DependencyInjection; namespace Volo.Abp.Cli.Commands { - public class CreateMigrationAndRunMigrator : IConsoleCommand, ITransientDependency + public class CreateMigrationAndRunMigratorCommand : IConsoleCommand, ITransientDependency { - public ILogger Logger { get; set; } + public ILogger Logger { get; set; } - public CreateMigrationAndRunMigrator() + public CreateMigrationAndRunMigratorCommand() { - Logger = NullLogger.Instance; + Logger = NullLogger.Instance; } public virtual async Task ExecuteAsync(CommandLineArgs commandLineArgs) From 9fea961c52fffdcd638b5eec22041a8a005aef80 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 22 Feb 2021 14:25:45 +0300 Subject: [PATCH 088/126] added author username filter to commits --- .../Admin/Comments/CommentGetListInput.cs | 2 +- .../Admin/Comments/CommentAdminAppService.cs | 4 +-- .../CmsKit/Comments/ICommentRepository.cs | 4 +-- .../Comments/EfCoreCommentRepository.cs | 27 +++++++++++++------ .../Comments/MongoCommentRepository.cs | 27 +++++++++++++------ 5 files changed, 43 insertions(+), 21 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs index beaf997947..0b0e6ab1c9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs @@ -13,7 +13,7 @@ namespace Volo.CmsKit.Admin.Comments public Guid? RepliedCommentId { get; set; } - public Guid? CreatorId { get; set; } + public string AuthorUserName { get; set; } public DateTime? CreationStartDate { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs index 238e475f15..276d58af05 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -30,7 +30,7 @@ namespace Volo.CmsKit.Admin.Comments input.EntityType, input.EntityId, input.RepliedCommentId, - input.CreatorId, + input.AuthorUserName, input.CreationStartDate, input.CreationEndDate); @@ -39,7 +39,7 @@ namespace Volo.CmsKit.Admin.Comments input.EntityType, input.EntityId, input.RepliedCommentId, - input.CreatorId, + input.AuthorUserName, input.CreationStartDate, input.CreationEndDate, input.Sorting, diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs index f6c4cfb25c..234b866183 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/ICommentRepository.cs @@ -16,7 +16,7 @@ namespace Volo.CmsKit.Comments string entityType = null, string entityId = null, Guid? repliedCommentId = null, - Guid? creatorId = null, + string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, string sorting = null, @@ -30,7 +30,7 @@ namespace Volo.CmsKit.Comments string entityType = null, string entityId = null, Guid? repliedCommentId = null, - Guid? creatorId = null, + string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, CancellationToken cancellationToken = default diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs index 9be480ce11..17408a95cd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs @@ -48,7 +48,7 @@ namespace Volo.CmsKit.Comments string entityType = null, string entityId = null, Guid? repliedCommentId = null, - Guid? creatorId = null, + string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, string sorting = null, @@ -61,8 +61,8 @@ namespace Volo.CmsKit.Comments filter, entityType, entityId, - repliedCommentId, - creatorId, + repliedCommentId, + authorUsername, creationStartDate, creationEndDate); @@ -86,7 +86,7 @@ namespace Volo.CmsKit.Comments string entityType = null, string entityId = null, Guid? repliedCommentId = null, - Guid? creatorId = null, + string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, CancellationToken cancellationToken = default @@ -97,7 +97,7 @@ namespace Volo.CmsKit.Comments entityType, entityId, repliedCommentId, - creatorId, + authorUsername, creationStartDate, creationEndDate); @@ -149,17 +149,28 @@ namespace Volo.CmsKit.Comments string entityType = null, string entityId = null, Guid? repliedCommentId = null, - Guid? creatorId = null, + string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null ) { - return (await GetDbSetAsync()) + var dbSet = await GetDbSetAsync(); + var queryable = dbSet.AsQueryable(); + + if (string.IsNullOrEmpty(authorUsername)) + { + var author = await (await GetDbContextAsync()).User.FirstOrDefaultAsync(x => x.UserName == authorUsername); + + var authorId = author?.Id ?? Guid.Empty; + + queryable.Where(x => x.CreatorId == authorId); + } + + return (dbSet) .WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Text.Contains(filter)) .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.EntityType.Contains(entityType)) .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.EntityId.Contains(entityId)) .WhereIf(repliedCommentId.HasValue, c => c.RepliedCommentId == repliedCommentId) - .WhereIf(creatorId.HasValue, c => c.CreatorId == creatorId) .WhereIf(creationStartDate.HasValue, c => c.CreationTime >= creationStartDate) .WhereIf(creationEndDate.HasValue, c => c.CreationTime <= creationEndDate); } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index 351a78333b..741d3b8b83 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -47,7 +47,7 @@ namespace Volo.CmsKit.MongoDB.Comments string entityType = null, string entityId = null, Guid? repliedCommentId = null, - Guid? creatorId = null, + string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, string sorting = null, @@ -61,7 +61,7 @@ namespace Volo.CmsKit.MongoDB.Comments entityType, entityId, repliedCommentId, - creatorId, + authorUsername, creationStartDate, creationEndDate, cancellationToken); @@ -96,7 +96,7 @@ namespace Volo.CmsKit.MongoDB.Comments string entityType = null, string entityId = null, Guid? repliedCommentId = null, - Guid? creatorId = null, + string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, CancellationToken cancellationToken = default @@ -107,7 +107,7 @@ namespace Volo.CmsKit.MongoDB.Comments entityType, entityId, repliedCommentId, - creatorId, + authorUsername, creationStartDate, creationEndDate, cancellationToken); @@ -174,18 +174,29 @@ namespace Volo.CmsKit.MongoDB.Comments string entityType = null, string entityId = null, Guid? repliedCommentId = null, - Guid? creatorId = null, + string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, CancellationToken cancellationToken = default ) { - return (await GetMongoQueryableAsync(cancellationToken)) - .WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Text.Contains(filter)) + var queryable = await GetMongoQueryableAsync(cancellationToken); + + if (string.IsNullOrEmpty(authorUsername)) + { + var authorQuerable = (await GetDbContextAsync(cancellationToken)).Collection().AsQueryable(); + + var author = await authorQuerable.FirstOrDefaultAsync(x => x.UserName == authorUsername, cancellationToken: cancellationToken); + + var authorId = author?.Id ?? Guid.Empty; + + queryable.Where(x => x.CreatorId == authorId); + } + + return queryable.WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Text.Contains(filter)) .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.EntityType == entityType) .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.EntityId == entityId) .WhereIf(repliedCommentId.HasValue, c => c.RepliedCommentId == repliedCommentId) - .WhereIf(creatorId.HasValue, c => c.CreatorId == creatorId) .WhereIf(creationStartDate.HasValue, c => c.CreationTime >= creationStartDate) .WhereIf(creationEndDate.HasValue, c => c.CreationTime <= creationEndDate); } From 0c7f38b9ae1962297c5c8eef2ca49f1db18f9934 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 22 Feb 2021 15:52:56 +0300 Subject: [PATCH 089/126] CmsKit - Move single BlogFeature checking services to common --- .../Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs | 13 -------- .../Blogs/IBlogFeatureAdminAppService.cs | 1 + .../Admin/Blogs/BlogFeatureAdminController.cs | 3 +- .../Volo/CmsKit}/Blogs/BlogFeatureDto.cs | 2 +- .../CmsKit/Blogs/IBlogFeatureAppService.cs} | 5 ++- .../Volo.CmsKit.Common.Application.csproj | 25 ++++++++------- .../CmsKit/Blogs/BlogFeatureAppService.cs} | 10 ++---- .../CmsKit/Blogs/BlogFeatureController.cs | 31 +++++++++++++++++++ .../Volo.CmsKit.Public.Application.csproj | 1 - .../Blogs/BlogFeaturePublicController.cs | 27 ---------------- .../Pages/CmsKit/Blogs/BlogPost.cshtml.cs | 12 +++---- .../Blogs/BlogFeaturePublicAppService_Test.cs | 8 ++--- 12 files changed, 62 insertions(+), 76 deletions(-) delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs rename modules/cms-kit/src/{Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public => Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit}/Blogs/BlogFeatureDto.cs (85%) rename modules/cms-kit/src/{Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs => Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/IBlogFeatureAppService.cs} (54%) rename modules/cms-kit/src/{Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs => Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs} (82%) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Blogs/BlogFeatureController.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs deleted file mode 100644 index 4ba3d20301..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogFeatureDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using JetBrains.Annotations; -using System; -using Volo.Abp.Application.Dtos; - -namespace Volo.CmsKit.Admin.Blogs -{ - public class BlogFeatureDto : EntityDto - { - [NotNull] - public string FeatureName { get; set; } - public bool Enabled { get; set; } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs index 639b7515fc..008081367d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogFeatureAdminAppService.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Volo.CmsKit.Blogs; namespace Volo.CmsKit.Admin.Blogs { diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs index b3c0e9f799..46cdf2fe54 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs @@ -2,11 +2,10 @@ using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.GlobalFeatures; +using Volo.CmsKit.Blogs; using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.Permissions; diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/BlogFeatureDto.cs similarity index 85% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs rename to modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/BlogFeatureDto.cs index 8fb4aa1fd5..bdd4f10435 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/BlogFeatureDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/BlogFeatureDto.cs @@ -1,7 +1,7 @@ using System; using Volo.Abp.Application.Dtos; -namespace Volo.CmsKit.Public.Blogs +namespace Volo.CmsKit.Blogs { public class BlogFeatureDto : EntityDto { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/IBlogFeatureAppService.cs similarity index 54% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/IBlogFeatureAppService.cs index c467b3acc7..968a820ae9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Blogs/IBlogFeaturePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/IBlogFeatureAppService.cs @@ -1,10 +1,9 @@ using System; -using System.Collections.Generic; using System.Threading.Tasks; -namespace Volo.CmsKit.Public.Blogs +namespace Volo.CmsKit.Blogs { - public interface IBlogFeaturePublicAppService + public interface IBlogFeatureAppService { Task GetOrDefaultAsync(Guid blogId, string featureName); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj index f6ab737d8e..1d7baff506 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj @@ -1,18 +1,19 @@ - - + + - - netstandard2.0 - - + + netstandard2.0 + + - - - - - - + + + + + + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs similarity index 82% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs index e001f524ed..fb894fa423 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogFeaturePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs @@ -1,20 +1,16 @@ using Microsoft.Extensions.Caching.Distributed; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Volo.Abp.Caching; -using Volo.CmsKit.Blogs; -namespace Volo.CmsKit.Public.Blogs +namespace Volo.CmsKit.Blogs { - public class BlogFeaturePublicAppService : CmsKitPublicAppServiceBase, IBlogFeaturePublicAppService + public class BlogFeatureAppService : CmsKitAppServiceBase, IBlogFeatureAppService { protected IBlogFeatureRepository BlogFeatureRepository { get; } protected IDistributedCache Cache { get; } - public BlogFeaturePublicAppService( + public BlogFeatureAppService( IBlogFeatureRepository blogFeatureRepository, IDistributedCache cache) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Blogs/BlogFeatureController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Blogs/BlogFeatureController.cs new file mode 100644 index 0000000000..441562e66d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Blogs/BlogFeatureController.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Mvc; +using System; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.GlobalFeatures; +using Volo.CmsKit.Blogs; +using Volo.CmsKit.GlobalFeatures; + +namespace Volo.CmsKit.Blogs +{ + [RequiresGlobalFeature(typeof(BlogsFeature))] + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit/blogs/{blogId}/features")] + public class BlogFeatureController : CmsKitControllerBase, IBlogFeatureAppService + { + protected IBlogFeatureAppService BlogFeatureAppService { get; } + + public BlogFeatureController(IBlogFeatureAppService blogFeatureAppService) + { + BlogFeatureAppService = blogFeatureAppService; + } + + [HttpGet] + [Route("{featureName}")] + public Task GetOrDefaultAsync(Guid blogId, string featureName) + { + return BlogFeatureAppService.GetOrDefaultAsync(blogId, featureName); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj index 5460e29406..702523e3c6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo.CmsKit.Public.Application.csproj @@ -11,7 +11,6 @@ - diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs deleted file mode 100644 index de957f5bd2..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogFeaturePublicController.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.CmsKit.Public.Blogs; - -namespace Volo.CmsKit.Public.HttpApi.Volo.CmsKit.Public.Blogs -{ - public class BlogFeaturePublicController : CmsKitPublicControllerBase, IBlogFeaturePublicAppService - { - protected IBlogFeaturePublicAppService BlogFeaturePublicAppService { get; } - - public BlogFeaturePublicController(IBlogFeaturePublicAppService blogFeaturePublicAppService) - { - BlogFeaturePublicAppService = blogFeaturePublicAppService; - } - - [HttpGet] - [Route("{blogId}/{featureName}")] - public Task GetOrDefaultAsync(Guid blogId, string featureName) - { - return BlogFeaturePublicAppService.GetOrDefaultAsync(blogId, featureName); - } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs index db178f2515..17325ff923 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs @@ -30,14 +30,14 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Blogs protected IBlogPostPublicAppService BlogPostPublicAppService { get; } - protected IBlogFeaturePublicAppService BlogFeaturePublicAppService { get; } + protected IBlogFeatureAppService BlogFeatureAppService { get; } public BlogPostModel( IBlogPostPublicAppService blogPostPublicAppService, - IBlogFeaturePublicAppService blogFeaturePublicAppService) + IBlogFeatureAppService blogFeaturePublicAppService) { BlogPostPublicAppService = blogPostPublicAppService; - BlogFeaturePublicAppService = blogFeaturePublicAppService; + BlogFeatureAppService = blogFeaturePublicAppService; } public virtual async Task OnGetAsync() @@ -46,17 +46,17 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Blogs if (GlobalFeatureManager.Instance.IsEnabled()) { - CommentsFeature = await BlogFeaturePublicAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.CommentsFeatureName); + CommentsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.CommentsFeatureName); } if (GlobalFeatureManager.Instance.IsEnabled()) { - ReactionsFeature = await BlogFeaturePublicAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.ReactionsFeatureName); + ReactionsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.ReactionsFeatureName); } if (GlobalFeatureManager.Instance.IsEnabled()) { - RatingsFeature = await BlogFeaturePublicAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.RatingsFeatureName); + RatingsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.RatingsFeatureName); } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs index fc34e8df8f..3aa39b9c11 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogFeaturePublicAppService_Test.cs @@ -12,18 +12,18 @@ namespace Volo.CmsKit.Blogs public class BlogFeaturePublicAppService_Test : CmsKitApplicationTestBase { private readonly CmsKitTestData testData; - private readonly IBlogFeaturePublicAppService blogFeaturePublicAppService; + private readonly IBlogFeatureAppService blogFeatureAppService; public BlogFeaturePublicAppService_Test() { testData = GetRequiredService(); - blogFeaturePublicAppService = GetRequiredService(); + blogFeatureAppService = GetRequiredService(); } [Fact] public async Task GetAsync_ShouldWorkProperly_WithExistingFeatureName() { - var result = await blogFeaturePublicAppService.GetOrDefaultAsync(testData.Blog_Id, testData.BlogFeature_1_FeatureName); + var result = await blogFeatureAppService.GetOrDefaultAsync(testData.Blog_Id, testData.BlogFeature_1_FeatureName); result.ShouldNotBeNull(); result.FeatureName.ShouldBe(testData.BlogFeature_1_FeatureName); @@ -33,7 +33,7 @@ namespace Volo.CmsKit.Blogs public async Task GetAsync_ShouldReturnDefault_WithNonExistingFeatureName() { var nonExistingFeatureName = "AnyOtherFeature"; - var result = await blogFeaturePublicAppService.GetOrDefaultAsync(testData.Blog_Id, nonExistingFeatureName); + var result = await blogFeatureAppService.GetOrDefaultAsync(testData.Blog_Id, nonExistingFeatureName); var defaultFeature = new BlogFeature(Guid.Empty, nonExistingFeatureName); result.ShouldNotBeNull(); From bf153d45e2cbd07271554832fd5efe1ac563f2c3 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 22 Feb 2021 16:16:57 +0300 Subject: [PATCH 090/126] file rename --- ...agAlreadyExistException.cs => ContentAlreadyExistException.cs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/{TagAlreadyExistException.cs => ContentAlreadyExistException.cs} (100%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/TagAlreadyExistException.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentAlreadyExistException.cs similarity index 100% rename from modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/TagAlreadyExistException.cs rename to modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentAlreadyExistException.cs From b55d0865fe3a8c45586e194dea394c412722730c Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 22 Feb 2021 16:17:32 +0300 Subject: [PATCH 091/126] add check and fix cancellation token usages. --- .../CmsKit/Blogs/EfCoreBlogPostRepository.cs | 45 +++++++++------- .../Volo/CmsKit/Blogs/EfCoreBlogRepository.cs | 9 ++-- .../Contents/EfCoreContentRepository.cs | 13 +++++ .../Volo/CmsKit/Pages/EfCorePageRepository.cs | 12 +++-- .../CmsKit/Tags/EfCoreEntityTagRepository.cs | 5 +- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 13 +++++ .../MongoDB/Blogs/MongoBlogPostRepository.cs | 51 +++++++++++-------- .../MongoDB/Blogs/MongoBlogRepository.cs | 5 +- .../Contents/MongoContentRepository.cs | 26 ++++++++-- .../MongoDB/Pages/MongoPageRepository.cs | 34 ++++++++----- .../MongoDB/Tags/MongoEntityTagRepository.cs | 22 ++++---- .../CmsKit/MongoDB/Tags/MongoTagRepository.cs | 10 ++++ .../Public/Contents/ContentController.cs | 10 ++-- .../CmsKit/Public/Tags/TagPublicController.cs | 2 +- 14 files changed, 179 insertions(+), 78 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs index 5a9c5d526a..e67427245e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs @@ -10,6 +10,8 @@ using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; using System.Linq; using System.Data.Common; +using JetBrains.Annotations; +using Volo.Abp; using Volo.Abp.Domain.Entities; namespace Volo.CmsKit.Blogs @@ -20,30 +22,34 @@ namespace Volo.CmsKit.Blogs { } - public async Task GetBySlugAsync(Guid blogId, string slug, CancellationToken cancellationToken = default) + public async Task GetBySlugAsync(Guid blogId, [NotNull] string slug, + CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(slug, nameof(slug)); + var dbSet = await GetDbSetAsync(); return await dbSet - .Include(i=> i.Creator) - .Where(x => - x.BlogId == blogId && x.Slug.ToLower() == slug) - .FirstOrDefaultAsync(cancellationToken: cancellationToken) - ?? throw new EntityNotFoundException(typeof(BlogPost)); + .Include(i => i.Creator) + .Where(x => + x.BlogId == blogId && x.Slug.ToLower() == slug) + .FirstOrDefaultAsync(cancellationToken: GetCancellationToken(cancellationToken)) + ?? throw new EntityNotFoundException(typeof(BlogPost)); } public async Task GetCountAsync(Guid blogId, CancellationToken cancellationToken = default) { return await (await GetQueryableAsync()).CountAsync( - x => x.BlogId == blogId, - cancellationToken); + x => x.BlogId == blogId, + GetCancellationToken(cancellationToken)); } - public async Task> GetPagedListAsync(Guid blogId, int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) + public async Task> GetPagedListAsync(Guid blogId, int skipCount, int maxResultCount, + string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) { var queryable = (await GetQueryableAsync()) - .Include(i => i.Creator) - .Where(x => x.BlogId == blogId); + .Include(i => i.Creator) + .Where(x => x.BlogId == blogId); if (!sorting.IsNullOrWhiteSpace()) { @@ -51,16 +57,19 @@ namespace Volo.CmsKit.Blogs } return await queryable - .Skip(skipCount) - .Take(maxResultCount) - .ToListAsync(cancellationToken); + .Skip(skipCount) + .Take(maxResultCount) + .ToListAsync(GetCancellationToken()); } - public async Task SlugExistsAsync(Guid blogId, string slug, CancellationToken cancellationToken = default) + public async Task SlugExistsAsync(Guid blogId, [NotNull] string slug, + CancellationToken cancellationToken = default) { - var dbSet = await GetDbSetAsync(); + Check.NotNullOrEmpty(slug, nameof(slug)); - return await dbSet.AnyAsync(x => x.BlogId == blogId && x.Slug.ToLower() == slug, cancellationToken); + var dbSet = await GetDbSetAsync(); + return await dbSet.AnyAsync(x => x.BlogId == blogId && x.Slug.ToLower() == slug, + GetCancellationToken(cancellationToken)); } } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs index f04889299c..c39dee2685 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogRepository.cs @@ -3,6 +3,8 @@ using System; using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Threading.Tasks; +using JetBrains.Annotations; +using Volo.Abp; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -17,12 +19,13 @@ namespace Volo.CmsKit.Blogs public virtual async Task ExistsAsync(Guid blogId, CancellationToken cancellationToken = default) { - return await (await GetQueryableAsync()).AnyAsync(x => x.Id == blogId, cancellationToken); + return await (await GetQueryableAsync()).AnyAsync(x => x.Id == blogId, GetCancellationToken(cancellationToken)); } - public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) + public virtual Task GetBySlugAsync([NotNull]string slug, CancellationToken cancellationToken = default) { - return GetAsync(x => x.Slug == slug, cancellationToken: cancellationToken); + Check.NotNullOrEmpty(slug, nameof(slug)); + return GetAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs index e8b88161ca..9a99bc5eca 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs @@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore; using System; using System.Threading; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -21,6 +22,9 @@ namespace Volo.CmsKit.Contents Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + return GetAsync(x => x.EntityType == entityType && x.EntityId == entityId && @@ -35,6 +39,9 @@ namespace Volo.CmsKit.Contents Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + return FindAsync(x => x.EntityType == entityType && x.EntityId == entityId && @@ -49,6 +56,9 @@ namespace Volo.CmsKit.Contents Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + return DeleteAsync(x => x.EntityType == entityType && x.EntityId == entityId && @@ -62,6 +72,9 @@ namespace Volo.CmsKit.Contents Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + var dbSet = await GetDbSetAsync(); return await dbSet.AnyAsync(x => x.EntityType == entityType && diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs index 3c213d98b3..d1d5578c02 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs @@ -4,7 +4,9 @@ using System.Linq; using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; +using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; +using Volo.Abp; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -43,18 +45,22 @@ namespace Volo.CmsKit.Pages .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) + public virtual Task GetBySlugAsync([NotNull] string slug, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(slug, nameof(slug)); return GetAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } - public virtual Task FindBySlugAsync(string slug, CancellationToken cancellationToken = default) + public virtual Task FindBySlugAsync([NotNull] string slug, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(slug, nameof(slug)); return FindAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } - public virtual async Task ExistsAsync(string slug, CancellationToken cancellationToken = default) + public virtual async Task ExistsAsync([NotNull] string slug, + CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(slug, nameof(slug)); return await (await GetDbSetAsync()).AnyAsync(x => x.Slug == slug, GetCancellationToken(cancellationToken)); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs index 5e1bbcebea..ae5d081b6a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs @@ -3,6 +3,7 @@ using System; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -30,11 +31,13 @@ namespace Volo.CmsKit.Tags [CanBeNull] Guid? tenantId, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityId, nameof(entityId)); + return base.FindAsync(x => x.TagId == tagId && x.EntityId == entityId && x.TenantId == tenantId, - cancellationToken: cancellationToken); + cancellationToken: GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs index 77c4854b8d..7325141c40 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -23,6 +24,9 @@ namespace Volo.CmsKit.Tags Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(name, nameof(name)); + return await (await GetDbSetAsync()).AnyAsync(x => x.EntityType == entityType && x.Name == name && @@ -36,6 +40,9 @@ namespace Volo.CmsKit.Tags Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(name, nameof(name)); + return GetAsync(x => x.EntityType == entityType && x.Name == name && @@ -49,6 +56,9 @@ namespace Volo.CmsKit.Tags Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(name, nameof(name)); + return FindAsync(x => x.EntityType == entityType && x.Name == name && @@ -62,6 +72,9 @@ namespace Volo.CmsKit.Tags Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + var entityTagIds = await (await GetDbContextAsync()).Set() .Where(q => q.EntityId == entityId && q.TenantId == tenantId) .Select(q => q.TagId) diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs index 85dc1b86e0..6c75e7fec3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs @@ -7,6 +7,8 @@ using System.Linq; using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; +using JetBrains.Annotations; +using Volo.Abp; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Blogs; @@ -16,34 +18,40 @@ namespace Volo.CmsKit.MongoDB.Blogs { public class MongoBlogPostRepository : MongoDbRepository, IBlogPostRepository { - public MongoBlogPostRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + public MongoBlogPostRepository(IMongoDbContextProvider dbContextProvider) : base( + dbContextProvider) { } - public Task GetBySlugAsync(Guid blogId, string slug, CancellationToken cancellationToken = default) + public Task GetBySlugAsync(Guid blogId, [NotNull] string slug, + CancellationToken cancellationToken = default) { - return GetAsync(x => - x.BlogId == blogId && - x.Slug.ToLower() == slug, - includeDetails: true, - cancellationToken: cancellationToken); + Check.NotNullOrEmpty(slug, nameof(slug)); + + return GetAsync(x => + x.BlogId == blogId && + x.Slug.ToLower() == slug, + includeDetails: true, + cancellationToken: GetCancellationToken(cancellationToken)); } public async Task GetCountAsync(Guid blogId, CancellationToken cancellationToken = default) { return await AsyncExecuter.CountAsync( - await WithDetailsAsync(), - x => x.BlogId == blogId, - cancellationToken); + await WithDetailsAsync(), + x => x.BlogId == blogId, + GetCancellationToken(cancellationToken)); } - public async Task> GetPagedListAsync(Guid blogId, int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) + public async Task> GetPagedListAsync(Guid blogId, int skipCount, int maxResultCount, + string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) { - var dbContext = await GetDbContextAsync(cancellationToken); + var token = GetCancellationToken(cancellationToken); + var dbContext = await GetDbContextAsync(token); var blogPostQueryable = await WithDetailsAsync(); var queryable = blogPostQueryable - .Where(x => x.BlogId == blogId); + .Where(x => x.BlogId == blogId); if (!sorting.IsNullOrWhiteSpace()) { @@ -51,17 +59,20 @@ namespace Volo.CmsKit.MongoDB.Blogs } queryable = queryable - .Skip(skipCount) - .Take(maxResultCount); + .Skip(skipCount) + .Take(maxResultCount); - return await AsyncExecuter.ToListAsync(queryable, cancellationToken); + return await AsyncExecuter.ToListAsync(queryable, token); } - public async Task SlugExistsAsync(Guid blogId, string slug, CancellationToken cancellationToken = default) + public async Task SlugExistsAsync(Guid blogId, [NotNull] string slug, + CancellationToken cancellationToken = default) { - var queryable = await GetMongoQueryableAsync(); + Check.NotNullOrEmpty(slug, nameof(slug)); - return await queryable.AnyAsync(x => x.BlogId == blogId && x.Slug.ToLower() == slug, cancellationToken); + var token = GetCancellationToken(cancellationToken); + var queryable = await GetMongoQueryableAsync(token); + return await queryable.AnyAsync(x => x.BlogId == blogId && x.Slug.ToLower() == slug, token); } } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs index 2b215d55c6..0cd46a130c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogRepository.cs @@ -2,6 +2,8 @@ using System; using System.Threading; using System.Threading.Tasks; +using JetBrains.Annotations; +using Volo.Abp; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Blogs; @@ -22,8 +24,9 @@ namespace Volo.CmsKit.MongoDB.Blogs cancellationToken); } - public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) + public virtual Task GetBySlugAsync([NotNull]string slug, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(slug, nameof(slug)); return GetAsync(x => x.Slug == slug, cancellationToken: cancellationToken); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs index fed8fe6e2e..fded228c16 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs @@ -3,6 +3,7 @@ using MongoDB.Driver.Linq; using System; using System.Threading; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Contents; @@ -11,7 +12,8 @@ namespace Volo.CmsKit.MongoDB.Contents { public class MongoContentRepository : MongoDbRepository, IContentRepository { - public MongoContentRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + public MongoContentRepository(IMongoDbContextProvider dbContextProvider) : base( + dbContextProvider) { } @@ -21,6 +23,9 @@ namespace Volo.CmsKit.MongoDB.Contents Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + return GetAsync(x => x.EntityType == entityType && x.EntityId == entityId && @@ -28,23 +33,30 @@ namespace Volo.CmsKit.MongoDB.Contents cancellationToken: GetCancellationToken(cancellationToken) ); } - + public virtual Task FindAsync( string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + return FindAsync(x => x.EntityType == entityType && x.EntityId == entityId && x.TenantId == tenantId, cancellationToken: GetCancellationToken(cancellationToken) - ); + ); } - public virtual Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + public virtual Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, + CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + return DeleteAsync(x => x.EntityType == entityType && x.EntityId == entityId && @@ -52,8 +64,12 @@ namespace Volo.CmsKit.MongoDB.Contents cancellationToken: GetCancellationToken(cancellationToken)); } - public virtual async Task ExistsAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + public virtual async Task ExistsAsync([NotNull] string entityType, [NotNull] string entityId, + Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + return await (await GetMongoQueryableAsync(cancellationToken)).AnyAsync(x => x.EntityType == entityType && x.EntityId == entityId && diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs index 66147d0e6d..ec520fe809 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs @@ -1,10 +1,12 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Linq.Dynamic.Core; +using JetBrains.Annotations; +using MongoDB.Driver; +using Volo.Abp; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using MongoDB.Driver; using MongoDB.Driver.Linq; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; @@ -14,14 +16,16 @@ namespace Volo.CmsKit.MongoDB.Pages { public class MongoPageRepository : MongoDbRepository, IPageRepository { - public MongoPageRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + public MongoPageRepository(IMongoDbContextProvider dbContextProvider) : base( + dbContextProvider) { } - public virtual async Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) + public virtual async Task GetCountAsync(string filter = null, + CancellationToken cancellationToken = default) { var cancellation = GetCancellationToken(cancellationToken); - + return await (await GetMongoQueryableAsync(cancellation)) .WhereIf>( !filter.IsNullOrWhiteSpace(), @@ -33,12 +37,12 @@ namespace Volo.CmsKit.MongoDB.Pages public virtual async Task> GetListAsync( string filter = null, int maxResultCount = int.MaxValue, - int skipCount = 0, + int skipCount = 0, string sorting = null, CancellationToken cancellationToken = default) { var cancellation = GetCancellationToken(cancellationToken); - + return await (await GetMongoQueryableAsync(cancellation)) .WhereIf>( !filter.IsNullOrWhiteSpace(), @@ -51,19 +55,23 @@ namespace Volo.CmsKit.MongoDB.Pages .ToListAsync(cancellation); } - public virtual Task GetBySlugAsync(string slug, CancellationToken cancellationToken = default) + public virtual Task GetBySlugAsync([NotNull]string slug, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(slug, nameof(slug)); return GetAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } - public virtual Task FindBySlugAsync(string slug, CancellationToken cancellationToken = default) + public virtual Task FindBySlugAsync([NotNull]string slug, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(slug, nameof(slug)); return FindAsync(x => x.Slug == slug, cancellationToken: GetCancellationToken(cancellationToken)); } - - public virtual async Task ExistsAsync(string slug, CancellationToken cancellationToken = default) + + public virtual async Task ExistsAsync([NotNull]string slug, CancellationToken cancellationToken = default) { - return await (await GetMongoQueryableAsync(cancellationToken)).AnyAsync(x => x.Slug == slug, GetCancellationToken(cancellationToken)); + Check.NotNullOrEmpty(slug, nameof(slug)); + return await (await GetMongoQueryableAsync(cancellationToken)).AnyAsync(x => x.Slug == slug, + GetCancellationToken(cancellationToken)); } } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs index c073f8206f..041b6af5a2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs @@ -4,23 +4,26 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Tags; namespace Volo.CmsKit.MongoDB.Tags { - public class MongoEntityTagRepository: MongoDbRepository, IEntityTagRepository + public class MongoEntityTagRepository : MongoDbRepository, IEntityTagRepository { - public MongoEntityTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + public MongoEntityTagRepository(IMongoDbContextProvider dbContextProvider) : base( + dbContextProvider) { } public async Task DeleteManyAsync(Guid[] tagIds, CancellationToken cancellationToken = default) { - var collection = await GetCollectionAsync(); - - await collection.DeleteManyAsync(Builders.Filter.In(x => x.TagId, tagIds)); + var token = GetCancellationToken(cancellationToken); + + var collection = await GetCollectionAsync(token); + await collection.DeleteManyAsync(Builders.Filter.In(x => x.TagId, tagIds), token); } public Task FindAsync( @@ -29,11 +32,12 @@ namespace Volo.CmsKit.MongoDB.Tags [CanBeNull] Guid? tenantId, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityId, nameof(entityId)); return base.FindAsync(x => - x.TagId == tagId && - x.EntityId == entityId && - x.TenantId == tenantId, - cancellationToken: cancellationToken); + x.TagId == tagId && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken)); } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs index 02c42c22fb..5e8fdf94a7 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Tags; @@ -24,6 +25,9 @@ namespace Volo.CmsKit.MongoDB.Tags Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(name, nameof(name)); + return await (await GetMongoQueryableAsync(cancellationToken)) .AnyAsync(x => x.EntityType == entityType && @@ -51,6 +55,9 @@ namespace Volo.CmsKit.MongoDB.Tags Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(name, nameof(name)); + return FindAsync(x => x.EntityType == entityType && x.Name == name && @@ -64,6 +71,9 @@ namespace Volo.CmsKit.MongoDB.Tags Guid? tenantId = null, CancellationToken cancellationToken = default) { + Check.NotNullOrEmpty(entityType, nameof(entityType)); + Check.NotNullOrEmpty(entityId, nameof(entityId)); + var entityTagIds = await (await GetDbContextAsync(cancellationToken)).EntityTags.AsQueryable() .Where(q => q.EntityId == entityId && q.TenantId == tenantId) .Select(q => q.TagId) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs index ab8270a2a1..9ba368f03d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs @@ -1,27 +1,29 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp; +using Volo.Abp.GlobalFeatures; using Volo.CmsKit.Contents; +using Volo.CmsKit.GlobalFeatures; namespace Volo.CmsKit.Public.Contents { - + [RequiresGlobalFeature(typeof(ContentsFeature))] [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] [Area("cms-kit")] [Route("api/cms-kit-public/contents")] public class ContentController : CmsKitControllerBase, IContentPublicAppService { - protected readonly IContentPublicAppService _contentAppService; + protected IContentPublicAppService ContentAppService { get; } public ContentController(IContentPublicAppService contentAppService) { - _contentAppService = contentAppService; + ContentAppService = contentAppService; } [HttpGet] public virtual Task GetAsync(GetContentInput input) { - return _contentAppService.GetAsync(input); + return ContentAppService.GetAsync(input); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagPublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagPublicController.cs index 55041e5c6e..b1f18e2511 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagPublicController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagPublicController.cs @@ -14,7 +14,7 @@ namespace Volo.CmsKit.Public.Tags [Route("api/cms-kit-public/tags")] public class TagPublicController : CmsKitPublicControllerBase, ITagAppService { - protected readonly ITagAppService TagAppService; + protected ITagAppService TagAppService { get; } public TagPublicController(ITagAppService tagAppService) { From 0d3889cbe79102dc7cf5359105b855092e37205f Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 22 Feb 2021 16:18:05 +0300 Subject: [PATCH 092/126] add checks and code fixes. --- .../Volo/CmsKit/Contents/Content.cs | 32 ++++++++----------- .../Volo/CmsKit/Pages/Page.cs | 2 +- .../Volo/CmsKit/Tags/Tag.cs | 4 +-- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs index 434ae4847b..392abfbc6f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs @@ -8,41 +8,37 @@ namespace Volo.CmsKit.Contents { public class Content : FullAuditedAggregateRoot, IMultiTenant { - [CanBeNull] - public virtual Guid? TenantId { get; protected set; } - - [NotNull] - public virtual string EntityType { get; protected set; } - - [NotNull] - public virtual string EntityId { get; protected set; } - - [NotNull] - public virtual string Value { get; protected set; } + [CanBeNull] public virtual Guid? TenantId { get; protected set; } + + [NotNull] public virtual string EntityType { get; protected set; } + + [NotNull] public virtual string EntityId { get; protected set; } + + [NotNull] public virtual string Value { get; protected set; } protected Content() { - } - - public Content(Guid id, [NotNull] string entityType, [NotNull] string entityId, [NotNull] string value, Guid? tenantId = null) : base(id) + + public Content(Guid id, [NotNull] string entityType, [NotNull] string entityId, [NotNull] string value, + Guid? tenantId = null) : base(id) { EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); Value = Check.NotNullOrEmpty(value, nameof(value), ContentConsts.MaxValueLength); - + TenantId = tenantId; } - public void SetValue([NotNull] string value) + public virtual void SetValue([NotNull] string value) { Value = Check.NotNullOrEmpty(value, nameof(value), ContentConsts.MaxValueLength); } - public void SetEntity([NotNull] string entityType, [NotNull] string entityId) + public virtual void SetEntity([NotNull] string entityType, [NotNull] string entityId) { EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); } } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs index f56dcd10bc..cae13a5254 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs @@ -8,7 +8,7 @@ namespace Volo.CmsKit.Pages { public class Page : FullAuditedAggregateRoot, IMultiTenant { - [CanBeNull] public virtual Guid? TenantId { get; set; } + [CanBeNull] public virtual Guid? TenantId { get; protected set; } [NotNull] public virtual string Title { get; protected set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs index 0c6ad99b2a..4b0ba20e30 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs @@ -8,7 +8,7 @@ namespace Volo.CmsKit.Tags { public class Tag : FullAuditedAggregateRoot, IMultiTenant { - public virtual Guid? TenantId { get; set; } + public virtual Guid? TenantId { get; protected set; } [NotNull] public virtual string EntityType { get; protected set; } @@ -33,7 +33,7 @@ namespace Volo.CmsKit.Tags public virtual void SetName(string name) { - Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); + Name = Check.NotNullOrEmpty(name, nameof(name), TagConsts.MaxNameLength); } public virtual void SetEntityType(string entityType) From 693e3109eb71347adb129d8575405105e1a1694e Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 22 Feb 2021 16:18:38 +0300 Subject: [PATCH 093/126] use getter only properties and async mapping methods. --- .../Admin/Blogs/BlogPostAdminAppService.cs | 16 ++++++++-------- .../Admin/Contents/ContentAdminAppService.cs | 2 +- .../Volo/CmsKit/Admin/Tags/TagAdminAppService.cs | 4 ++-- .../MediaDescriptorAppService.cs | 4 ++-- .../Volo/CmsKit/Tags/TagAppService.cs | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs index d2c1114dfb..fc57121040 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs @@ -27,11 +27,11 @@ namespace Volo.CmsKit.Admin.Blogs UpdateBlogPostDto> , IBlogPostAdminAppService { - protected readonly IBlogPostManager BlogPostManager; - protected readonly IBlogPostRepository BlogPostRepository; - protected readonly IBlogRepository BlogRepository; - protected readonly IBlobContainer BlobContainer; - protected readonly ICmsUserLookupService UserLookupService; + protected IBlogPostManager BlogPostManager { get; } + protected IBlogPostRepository BlogPostRepository { get; } + protected IBlogRepository BlogRepository { get; } + protected IBlobContainer BlobContainer { get; } + protected ICmsUserLookupService UserLookupService { get; } public BlogPostAdminAppService( IRepository repository, @@ -60,7 +60,7 @@ namespace Volo.CmsKit.Admin.Blogs var blogPost = await BlogPostRepository.GetBySlugAsync(blog.Id, blogPostSlug); - return MapToGetOutputDto(blogPost); + return await MapToGetOutputDtoAsync(blogPost); } [Authorize(CmsKitAdminPermissions.BlogPosts.Create)] @@ -77,7 +77,7 @@ namespace Volo.CmsKit.Admin.Blogs input.Slug, input.ShortDescription)); - return MapToGetOutputDto(entity); + return await MapToGetOutputDtoAsync(entity); } [Authorize(CmsKitAdminPermissions.BlogPosts.Update)] @@ -96,7 +96,7 @@ namespace Volo.CmsKit.Admin.Blogs await BlogPostManager.UpdateAsync(blogPost); - return MapToGetOutputDto(blogPost); + return await MapToGetOutputDtoAsync(blogPost); } public virtual async Task SetCoverImageAsync(Guid id, RemoteStreamContent streamContent) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs index 020b4fd29e..1aa0bffcfa 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs @@ -53,7 +53,7 @@ namespace Volo.CmsKit.Admin.Contents await ContentManager.InsertAsync(entity); - return MapToGetOutputDto(entity); + return await MapToGetOutputDtoAsync(entity); } public virtual async Task GetAsync( diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs index fd276cb31a..15dde35076 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs @@ -50,7 +50,7 @@ namespace Volo.CmsKit.Admin.Tags input.Name, CurrentTenant?.Id); - return MapToGetOutputDto(tag); + return await MapToGetOutputDtoAsync(tag); } [Authorize(CmsKitAdminPermissions.Tags.Update)] @@ -60,7 +60,7 @@ namespace Volo.CmsKit.Admin.Tags id, input.Name); - return MapToGetOutputDto(tag); + return await MapToGetOutputDtoAsync(tag); } protected override IQueryable CreateFilteredQuery(TagGetListInput input) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/MediaDescriptors/MediaDescriptorAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/MediaDescriptors/MediaDescriptorAppService.cs index 81879c5da9..0068390312 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/MediaDescriptors/MediaDescriptorAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/MediaDescriptors/MediaDescriptorAppService.cs @@ -10,8 +10,8 @@ namespace Volo.CmsKit.MediaDescriptors [RequiresGlobalFeature(typeof(MediaFeature))] public class MediaDescriptorAppService : CmsKitAppServiceBase, IMediaDescriptorAppService { - protected readonly IMediaDescriptorRepository MediaDescriptorRepository; - protected readonly IBlobContainer MediaContainer; + protected IMediaDescriptorRepository MediaDescriptorRepository { get; } + protected IBlobContainer MediaContainer { get; } public MediaDescriptorAppService(IMediaDescriptorRepository mediaDescriptorRepository, IBlobContainer mediaContainer) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs index caa6dc4181..61dfb15571 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs @@ -9,7 +9,7 @@ namespace Volo.CmsKit.Tags { public class TagAppService : CmsKitAppServiceBase, ITagAppService { - protected readonly ITagRepository TagRepository; + protected ITagRepository TagRepository { get; } public TagAppService(ITagRepository tagRepository) { From 7935c5b8e09da86ae5ac1f39f8472e814985f595 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 22 Feb 2021 16:18:55 +0300 Subject: [PATCH 094/126] use httpstatuscode enum instead of integer. --- .../Admin/MediaDescriptors/MediaDescriptorAdminController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/MediaDescriptors/MediaDescriptorAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/MediaDescriptors/MediaDescriptorAdminController.cs index a3b438e341..4267f635b0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/MediaDescriptors/MediaDescriptorAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/MediaDescriptors/MediaDescriptorAdminController.cs @@ -1,4 +1,5 @@ using System; +using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; @@ -57,7 +58,7 @@ namespace Volo.CmsKit.Admin.MediaDescriptors var mediaDescriptorDto = await MediaDescriptorAdminAppService.CreateAsync(inputStream); - return StatusCode(201, mediaDescriptorDto); + return StatusCode((int)HttpStatusCode.Created, mediaDescriptorDto); } } } \ No newline at end of file From 88959c90221e14bc434a51f8c6a31584f5934f43 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 22 Feb 2021 16:19:15 +0300 Subject: [PATCH 095/126] use static slughelper instead of creating. --- .../Volo/CmsKit/Blogs/Extensions/SlugExtensions.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Extensions/SlugExtensions.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Extensions/SlugExtensions.cs index 9b3908d8cb..a625d4687f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Extensions/SlugExtensions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Extensions/SlugExtensions.cs @@ -5,11 +5,10 @@ namespace Volo.CmsKit.Blogs.Extensions { public static class SlugExtensions { + static readonly SlugHelper SlugHelper = new (); public static string NormalizeSlug(this string value) { - var slugHelper = new SlugHelper(); - - return slugHelper.GenerateSlug(value?.Unidecode()); + return SlugHelper.GenerateSlug(value?.Unidecode()); } } } From ddc270e5986b46f67243a91b35a924b2426a4afe Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Mon, 22 Feb 2021 16:38:20 +0300 Subject: [PATCH 096/126] remove forwardRef from AbstractNgModelComponent spec --- .../packages/core/src/lib/tests/ng-model.component.spec.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/tests/ng-model.component.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/ng-model.component.spec.ts index c0dc284815..fbb19ac3fc 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/ng-model.component.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/ng-model.component.spec.ts @@ -1,8 +1,8 @@ -import { Component, forwardRef, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms'; import { createHostFactory, SpectatorHost } from '@ngneat/spectator/jest'; -import { AbstractNgModelComponent } from '../abstracts'; import { timer } from 'rxjs'; +import { AbstractNgModelComponent } from '../abstracts'; @Component({ selector: 'abp-test', @@ -10,8 +10,7 @@ import { timer } from 'rxjs'; providers: [ { provide: NG_VALUE_ACCESSOR, - // tslint:disable-next-line: no-forward-ref - useExisting: forwardRef(() => TestComponent), + useExisting: TestComponent, multi: true, }, ], From eeee8bb304c1aa69ddf018b02da4718f2b74bbc4 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 22 Feb 2021 16:46:02 +0300 Subject: [PATCH 097/126] CmsKit - Purge Cache of BlogFeature --- .../Admin/Blogs/BlogFeatureAdminAppService.cs | 15 ++++++++++++- .../CmsKit/Blogs/BlogFeatureAppService.cs | 1 + .../CmsKit/Blogs/BlogFeatureChangedEto.cs | 13 +++++++++++ .../CmsKit/Blogs/BlogFeatureChangedHandler.cs | 22 +++++++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedHandler.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index 9c6ca82852..d3fbdb5cb5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Volo.Abp.EventBus.Distributed; using Volo.Abp.GlobalFeatures; using Volo.CmsKit.Admin.Blogs; using Volo.CmsKit.Blogs; @@ -16,14 +17,19 @@ namespace Volo.CmsKit.Admin.Blogs public class BlogFeatureAdminAppService : CmsKitAdminAppServiceBase, IBlogFeatureAdminAppService { protected IBlogFeatureRepository BlogFeatureRepository { get; } + protected IBlogFeatureManager BlogFeatureManager { get; } + protected IDistributedEventBus EventBus { get; } + public BlogFeatureAdminAppService( IBlogFeatureRepository blogFeatureRepository, - IBlogFeatureManager blogFeatureManager) + IBlogFeatureManager blogFeatureManager, + IDistributedEventBus eventBus) { BlogFeatureRepository = blogFeatureRepository; BlogFeatureManager = blogFeatureManager; + EventBus = eventBus; } [Authorize(CmsKitAdminPermissions.Blogs.Features)] @@ -48,6 +54,13 @@ namespace Volo.CmsKit.Admin.Blogs blogFeature.IsEnabled = dto.IsEnabled; await BlogFeatureRepository.UpdateAsync(blogFeature); } + + await EventBus.PublishAsync(new BlogFeatureChangedEto + { + BlogId = blogId, + FeatureName = dto.FeatureName, + IsEnabled = dto.IsEnabled + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs index 820da8e660..32bfa9ebdc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs @@ -2,6 +2,7 @@ using System; using System.Threading.Tasks; using Volo.Abp.Caching; +using Volo.Abp.EventBus.Distributed; namespace Volo.CmsKit.Blogs { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs new file mode 100644 index 0000000000..e03b63cf34 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp.EventBus; + +namespace Volo.CmsKit.Blogs +{ + [EventName("CmsKit.Blogs.BlogFeature.Changed")] + public class BlogFeatureChangedEto + { + public Guid BlogId { get; set; } + public string FeatureName { get; set; } + public bool IsEnabled { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedHandler.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedHandler.cs new file mode 100644 index 0000000000..2697b7f2e5 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedHandler.cs @@ -0,0 +1,22 @@ +using System.Threading.Tasks; +using Volo.Abp.Caching; +using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus.Distributed; + +namespace Volo.CmsKit.Blogs +{ + public class BlogFeatureChangedHandler : IDistributedEventHandler, ITransientDependency + { + protected IDistributedCache Cache { get; } + + public BlogFeatureChangedHandler(IDistributedCache cache) + { + Cache = cache; + } + + public async Task HandleEventAsync(BlogFeatureChangedEto eventData) + { + await Cache.RemoveAsync($"{eventData.BlogId}_{eventData.FeatureName}"); + } + } +} From afd9cd9d39b8c6366f0e8aa089995e015c0470e4 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 22 Feb 2021 16:52:35 +0300 Subject: [PATCH 098/126] refactoring --- .../Admin/Comments/CommentGetListInput.cs | 2 +- .../Admin/Comments/CommentAdminAppService.cs | 5 +- .../Comments/EfCoreCommentRepository.cs | 49 ++++++++++--------- .../Comments/MongoCommentRepository.cs | 8 +-- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs index 0b0e6ab1c9..f2d14c8153 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Comments/CommentGetListInput.cs @@ -13,7 +13,7 @@ namespace Volo.CmsKit.Admin.Comments public Guid? RepliedCommentId { get; set; } - public string AuthorUserName { get; set; } + public string Author { get; set; } public DateTime? CreationStartDate { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs index 276d58af05..df381fbc2b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; @@ -30,7 +29,7 @@ namespace Volo.CmsKit.Admin.Comments input.EntityType, input.EntityId, input.RepliedCommentId, - input.AuthorUserName, + input.Author, input.CreationStartDate, input.CreationEndDate); @@ -39,7 +38,7 @@ namespace Volo.CmsKit.Admin.Comments input.EntityType, input.EntityId, input.RepliedCommentId, - input.AuthorUserName, + input.Author, input.CreationStartDate, input.CreationEndDate, input.Sorting, diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs index 17408a95cd..8c8e777185 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs @@ -66,19 +66,15 @@ namespace Volo.CmsKit.Comments creationStartDate, creationEndDate); - query = query.OrderBy(sorting ?? "creationTime desc") - .PageBy(skipCount, maxResultCount); + if (sorting != null) + { + sorting = "comment." + sorting; + } - var query2 = from comment in query - join user in (await GetDbContextAsync()).Set() on comment.CreatorId equals user.Id - orderby comment.CreationTime - select new CommentWithAuthorQueryResultItem - { - Comment = comment, - Author = user - }; + query = query.OrderBy(sorting ?? "comment.creationTime desc") + .PageBy(skipCount, maxResultCount); - return await query2.ToListAsync(GetCancellationToken(cancellationToken)); + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } public async Task GetCountAsync( @@ -144,7 +140,7 @@ namespace Volo.CmsKit.Comments await DeleteAsync(comment, cancellationToken: GetCancellationToken(cancellationToken)); } - protected virtual async Task> GetListQueryAsync( + protected virtual async Task> GetListQueryAsync( string filter = null, string entityType = null, string entityId = null, @@ -154,25 +150,30 @@ namespace Volo.CmsKit.Comments DateTime? creationEndDate = null ) { - var dbSet = await GetDbSetAsync(); - var queryable = dbSet.AsQueryable(); + var query = from comment in (await GetDbSetAsync()) + join user in (await GetDbContextAsync()).Set() + on comment.CreatorId equals user.Id + select new CommentWithAuthorQueryResultItem + { + Comment = comment, + Author = user + }; - if (string.IsNullOrEmpty(authorUsername)) + if (!string.IsNullOrWhiteSpace(authorUsername)) { - var author = await (await GetDbContextAsync()).User.FirstOrDefaultAsync(x => x.UserName == authorUsername); + var author = await (await GetDbContextAsync()).Set().FirstOrDefaultAsync(x => x.UserName == authorUsername); var authorId = author?.Id ?? Guid.Empty; - queryable.Where(x => x.CreatorId == authorId); + query = query.Where(x => x.Comment.CreatorId == authorId); } - return (dbSet) - .WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Text.Contains(filter)) - .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.EntityType.Contains(entityType)) - .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.EntityId.Contains(entityId)) - .WhereIf(repliedCommentId.HasValue, c => c.RepliedCommentId == repliedCommentId) - .WhereIf(creationStartDate.HasValue, c => c.CreationTime >= creationStartDate) - .WhereIf(creationEndDate.HasValue, c => c.CreationTime <= creationEndDate); + return query.WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Comment.Text.Contains(filter)) + .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.Comment.EntityType.Contains(entityType)) + .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.Comment.EntityId.Contains(entityId)) + .WhereIf(repliedCommentId.HasValue, c => c.Comment.RepliedCommentId == repliedCommentId) + .WhereIf(creationStartDate.HasValue, c => c.Comment.CreationTime >= creationStartDate) + .WhereIf(creationEndDate.HasValue, c => c.Comment.CreationTime <= creationEndDate); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index 741d3b8b83..c58b550305 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -182,15 +182,15 @@ namespace Volo.CmsKit.MongoDB.Comments { var queryable = await GetMongoQueryableAsync(cancellationToken); - if (string.IsNullOrEmpty(authorUsername)) + if (!string.IsNullOrEmpty(authorUsername)) { - var authorQuerable = (await GetDbContextAsync(cancellationToken)).Collection().AsQueryable(); + var authorQueryable = (await GetDbContextAsync(cancellationToken)).Collection().AsQueryable(); - var author = await authorQuerable.FirstOrDefaultAsync(x => x.UserName == authorUsername, cancellationToken: cancellationToken); + var author = await authorQueryable.FirstOrDefaultAsync(x => x.UserName == authorUsername, cancellationToken: cancellationToken); var authorId = author?.Id ?? Guid.Empty; - queryable.Where(x => x.CreatorId == authorId); + queryable = queryable.Where(x => x.CreatorId == authorId); } return queryable.WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Text.Contains(filter)) From 7807dcf6509609968599419f86cf9928c43504f1 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 22 Feb 2021 16:53:28 +0300 Subject: [PATCH 099/126] CmsKit - Add missing TagsFeature check to BlogPost --- .../Pages/CmsKit/Blogs/BlogPost.cshtml | 11 +++++++---- .../Pages/CmsKit/Blogs/BlogPost.cshtml.cs | 7 +++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml index 4787783b68..9853f045dc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml @@ -26,11 +26,14 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(TagViewComponent), new + if (Model.TagsFeature?.IsEnabled == true) { - entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, - entityId = Model.BlogPost.Id.ToString() - }) + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, + entityId = Model.BlogPost.Id.ToString() + }) + } } @if (GlobalFeatureManager.Instance.IsEnabled()) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs index 17325ff923..bf10548027 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml.cs @@ -28,6 +28,8 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Blogs public BlogFeatureDto RatingsFeature { get; private set; } + public BlogFeatureDto TagsFeature { get; private set; } + protected IBlogPostPublicAppService BlogPostPublicAppService { get; } protected IBlogFeatureAppService BlogFeatureAppService { get; } @@ -58,6 +60,11 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Blogs { RatingsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.RatingsFeatureName); } + + if (GlobalFeatureManager.Instance.IsEnabled()) + { + TagsFeature = await BlogFeatureAppService.GetOrDefaultAsync(BlogPost.BlogId, BlogPostConsts.TagsFeatureName); + } } } } From ab10b6352fa7c76f79de70e09e47e0ef4301153b Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 22 Feb 2021 16:54:21 +0300 Subject: [PATCH 100/126] CmsKit - Code-formatting at BlogPost.cshtml --- .../Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml index 9853f045dc..4eb2fa0ccd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Blogs/BlogPost.cshtml @@ -45,7 +45,6 @@ entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, entityId = Model.BlogPost.Id.ToString() }) - } } From 61b4e1351e57321816c99e4e8c05f481acea39cc Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 22 Feb 2021 17:33:39 +0300 Subject: [PATCH 101/126] CmsKit - Provide BlogFeature caching from IBlogFeatureCacheManager --- .../CmsKit/Blogs/IBlogFeatureCacheManager.cs | 14 ++++++ .../CmsKit/Blogs/BlogFeatureAppService.cs | 23 +++++----- .../CmsKit/Blogs/BlogFeatureCacheManager.cs | 46 +++++++++++++++++++ .../CmsKit/Blogs/BlogFeatureChangedEto.cs | 4 ++ 4 files changed, 75 insertions(+), 12 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/IBlogFeatureCacheManager.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureCacheManager.cs rename modules/cms-kit/src/{Volo.CmsKit.Common.Application => Volo.CmsKit.Domain.Shared}/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs (75%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/IBlogFeatureCacheManager.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/IBlogFeatureCacheManager.cs new file mode 100644 index 0000000000..9134b67a06 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Blogs/IBlogFeatureCacheManager.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Volo.CmsKit.Blogs +{ + public interface IBlogFeatureCacheManager + { + Task AddOrGetAsync(Guid blogId, string featureName, Func> factory); + Task ClearAsync(Guid blogId, string featureName); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs index 32bfa9ebdc..899535600f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs @@ -9,28 +9,27 @@ namespace Volo.CmsKit.Blogs public class BlogFeatureAppService : CmsKitAppServiceBase, IBlogFeatureAppService { protected IBlogFeatureRepository BlogFeatureRepository { get; } - protected IDistributedCache Cache { get; } + protected IBlogFeatureCacheManager BlogFeatureCacheManager { get; } public BlogFeatureAppService( IBlogFeatureRepository blogFeatureRepository, - IDistributedCache cache) + IBlogFeatureCacheManager blogFeatureCacheManager) { BlogFeatureRepository = blogFeatureRepository; - Cache = cache; + BlogFeatureCacheManager = blogFeatureCacheManager; } - public async Task GetOrDefaultAsync(Guid blogId, string featureName) + public Task GetOrDefaultAsync(Guid blogId, string featureName) { - return await Cache.GetOrAddAsync( - $"{blogId}_{featureName}", - () => GetFromDatabaseAsync(blogId, featureName), - () => new DistributedCacheEntryOptions - { - SlidingExpiration = TimeSpan.FromMinutes(1) - }); + return BlogFeatureCacheManager + .AddOrGetAsync( + blogId, + featureName, + ()=> GetOrDefaultFromDatabaseAsync(blogId, featureName) + ); } - private async Task GetFromDatabaseAsync(Guid blogId, string featureName) + private async Task GetOrDefaultFromDatabaseAsync(Guid blogId, string featureName) { var feature = await BlogFeatureRepository.FindAsync(blogId, featureName); var blogFeature = feature ?? new BlogFeature(blogId, featureName); diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureCacheManager.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureCacheManager.cs new file mode 100644 index 0000000000..353bc8dad9 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureCacheManager.cs @@ -0,0 +1,46 @@ +using JetBrains.Annotations; +using Microsoft.Extensions.Caching.Distributed; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Caching; +using Volo.Abp.DependencyInjection; + +namespace Volo.CmsKit.Blogs +{ + public class BlogFeatureCacheManager : IBlogFeatureCacheManager, ITransientDependency + { + protected IDistributedCache Cache { get; } + + public BlogFeatureCacheManager(IDistributedCache cache) + { + Cache = cache; + } + + public async Task AddOrGetAsync(Guid blogId, string featureName, Func> factory) + { + return await Cache.GetOrAddAsync( + GetCacheKey(blogId, featureName), + factory, + () => new DistributedCacheEntryOptions + { + AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1) + }); + } + + public Task ClearAsync(Guid blogId, string featureName) + { + return Cache.RemoveAsync(GetCacheKey(blogId, featureName)); + } + + private string GetCacheKey(Guid blogId, [NotNull] string featureName) + { + Check.NotNullOrWhiteSpace(featureName, nameof(featureName)); + + return $"{blogId}_{featureName}"; + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs similarity index 75% rename from modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs rename to modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs index e03b63cf34..954c851d04 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogFeatureChangedEto.cs @@ -1,4 +1,8 @@ using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; using Volo.Abp.EventBus; namespace Volo.CmsKit.Blogs From d04287a890f4e6ed3ad1178e75f9571107ecaafd Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 22 Feb 2021 17:34:26 +0300 Subject: [PATCH 102/126] CmsKit - Code-formatting at BlogFeatureAppService.cs --- .../Volo/CmsKit/Blogs/BlogFeatureAppService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs index 899535600f..cddb805c5c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs @@ -9,6 +9,7 @@ namespace Volo.CmsKit.Blogs public class BlogFeatureAppService : CmsKitAppServiceBase, IBlogFeatureAppService { protected IBlogFeatureRepository BlogFeatureRepository { get; } + protected IBlogFeatureCacheManager BlogFeatureCacheManager { get; } public BlogFeatureAppService( From c388e491d1e21c8e2ce93b65ac728d50b6c9f4cc Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 22 Feb 2021 18:22:16 +0300 Subject: [PATCH 103/126] repository refactorings --- .../Comments/EfCoreCommentRepository.cs | 95 ++++++++++--------- .../Comments/MongoCommentRepository.cs | 11 ++- 2 files changed, 54 insertions(+), 52 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs index 8c8e777185..8ca73426be 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs @@ -22,7 +22,8 @@ namespace Volo.CmsKit.Comments { } - public async Task GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default) + public async Task GetWithAuthorAsync(Guid id, + CancellationToken cancellationToken = default) { var query = from comment in (await GetDbSetAsync()) join user in (await GetDbContextAsync()).Set() on comment.CreatorId equals user.Id @@ -44,60 +45,64 @@ namespace Volo.CmsKit.Comments } public async Task> GetListAsync( - string filter = null, - string entityType = null, - string entityId = null, + string filter = null, + string entityType = null, + string entityId = null, Guid? repliedCommentId = null, string authorUsername = null, - DateTime? creationStartDate = null, - DateTime? creationEndDate = null, + DateTime? creationStartDate = null, + DateTime? creationEndDate = null, string sorting = null, - int maxResultCount = int.MaxValue, - int skipCount = 0, + int maxResultCount = int.MaxValue, + int skipCount = 0, CancellationToken cancellationToken = default - ) + ) { + var token = GetCancellationToken(cancellationToken); var query = await GetListQueryAsync( - filter, - entityType, - entityId, + filter, + entityType, + entityId, repliedCommentId, authorUsername, - creationStartDate, - creationEndDate); + creationStartDate, + creationEndDate, + token); if (sorting != null) { sorting = "comment." + sorting; } - + query = query.OrderBy(sorting ?? "comment.creationTime desc") - .PageBy(skipCount, maxResultCount); - - return await query.ToListAsync(GetCancellationToken(cancellationToken)); + .PageBy(skipCount, maxResultCount); + + return await query.ToListAsync(token); } public async Task GetCountAsync( - string text = null, - string entityType = null, + string text = null, + string entityType = null, string entityId = null, - Guid? repliedCommentId = null, + Guid? repliedCommentId = null, string authorUsername = null, DateTime? creationStartDate = null, - DateTime? creationEndDate = null, + DateTime? creationEndDate = null, CancellationToken cancellationToken = default - ) + ) { + var token = GetCancellationToken(cancellationToken); var query = await GetListQueryAsync( - text, - entityType, - entityId, - repliedCommentId, + text, + entityType, + entityId, + repliedCommentId, authorUsername, - creationStartDate, - creationEndDate); + creationStartDate, + creationEndDate, + token); - return await query.LongCountAsync(GetCancellationToken(cancellationToken)); + return await query.LongCountAsync(token); } public async Task> GetListWithAuthorsAsync( @@ -141,39 +146,35 @@ namespace Volo.CmsKit.Comments } protected virtual async Task> GetListQueryAsync( - string filter = null, - string entityType = null, + string filter = null, + string entityType = null, string entityId = null, - Guid? repliedCommentId = null, + Guid? repliedCommentId = null, string authorUsername = null, DateTime? creationStartDate = null, - DateTime? creationEndDate = null - ) + DateTime? creationEndDate = null, + CancellationToken cancellationToken = default + ) { - var query = from comment in (await GetDbSetAsync()) - join user in (await GetDbContextAsync()).Set() + var commentDbSet = await GetDbSetAsync(); + var cmsUserSet = (await GetDbContextAsync()).Set(); + + var query = from comment in commentDbSet + join user in cmsUserSet on comment.CreatorId equals user.Id select new CommentWithAuthorQueryResultItem { Comment = comment, Author = user }; - - if (!string.IsNullOrWhiteSpace(authorUsername)) - { - var author = await (await GetDbContextAsync()).Set().FirstOrDefaultAsync(x => x.UserName == authorUsername); - - var authorId = author?.Id ?? Guid.Empty; - query = query.Where(x => x.Comment.CreatorId == authorId); - } - return query.WhereIf(!filter.IsNullOrWhiteSpace(), c => c.Comment.Text.Contains(filter)) .WhereIf(!entityType.IsNullOrWhiteSpace(), c => c.Comment.EntityType.Contains(entityType)) .WhereIf(!entityId.IsNullOrWhiteSpace(), c => c.Comment.EntityId.Contains(entityId)) .WhereIf(repliedCommentId.HasValue, c => c.Comment.RepliedCommentId == repliedCommentId) + .WhereIf(!authorUsername.IsNullOrWhiteSpace(),c=>c.Author.UserName.Contains(authorUsername)) .WhereIf(creationStartDate.HasValue, c => c.Comment.CreationTime >= creationStartDate) .WhereIf(creationEndDate.HasValue, c => c.Comment.CreationTime <= creationEndDate); } } -} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index c58b550305..6c3158b0e5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -56,6 +56,7 @@ namespace Volo.CmsKit.MongoDB.Comments CancellationToken cancellationToken = default ) { + var token = GetCancellationToken(cancellationToken); var query = await GetListQueryAsync( filter, entityType, @@ -64,22 +65,22 @@ namespace Volo.CmsKit.MongoDB.Comments authorUsername, creationStartDate, creationEndDate, - cancellationToken); + token); var comments = await query.OrderBy(sorting ?? "creationTime desc") .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(token); var commentIds = comments.Select(x => x.Id).ToList(); - var authorsQuery = from comment in (await GetMongoQueryableAsync(cancellationToken)) - join user in (await GetDbContextAsync(cancellationToken)).CmsUsers on comment.CreatorId equals user.Id + var authorsQuery = from comment in (await GetMongoQueryableAsync(token)) + join user in (await GetDbContextAsync(token)).CmsUsers on comment.CreatorId equals user.Id where commentIds.Contains(comment.Id) orderby comment.CreationTime select user; - var authors = await authorsQuery.ToListAsync(cancellationToken); + var authors = await authorsQuery.ToListAsync(token); return comments .Select( From 0b0afcc95fdeef37f7f27bb9e14239d0b130f6a1 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 22 Feb 2021 18:30:30 +0300 Subject: [PATCH 104/126] CmsKit - Refactor BlogFeatureAppService.cs --- .../Volo/CmsKit/Blogs/BlogFeatureAppService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs index cddb805c5c..a1671b93c9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs @@ -8,9 +8,9 @@ namespace Volo.CmsKit.Blogs { public class BlogFeatureAppService : CmsKitAppServiceBase, IBlogFeatureAppService { - protected IBlogFeatureRepository BlogFeatureRepository { get; } + protected virtual IBlogFeatureRepository BlogFeatureRepository { get; } - protected IBlogFeatureCacheManager BlogFeatureCacheManager { get; } + protected virtual IBlogFeatureCacheManager BlogFeatureCacheManager { get; } public BlogFeatureAppService( IBlogFeatureRepository blogFeatureRepository, @@ -20,17 +20,17 @@ namespace Volo.CmsKit.Blogs BlogFeatureCacheManager = blogFeatureCacheManager; } - public Task GetOrDefaultAsync(Guid blogId, string featureName) + public virtual Task GetOrDefaultAsync(Guid blogId, string featureName) { return BlogFeatureCacheManager .AddOrGetAsync( blogId, featureName, - ()=> GetOrDefaultFromDatabaseAsync(blogId, featureName) + ()=> GetOrDefaultFroRepositoryAsync(blogId, featureName) ); } - private async Task GetOrDefaultFromDatabaseAsync(Guid blogId, string featureName) + protected virtual async Task GetOrDefaultFroRepositoryAsync(Guid blogId, string featureName) { var feature = await BlogFeatureRepository.FindAsync(blogId, featureName); var blogFeature = feature ?? new BlogFeature(blogId, featureName); From 180263adb4775d6f0a42b3cb2c35004629f993f2 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 22 Feb 2021 19:08:13 +0300 Subject: [PATCH 105/126] CmsKit - Move EventBus & Set logic to Domain layer --- .../Admin/Blogs/BlogFeatureAdminAppService.cs | 21 ++--------- .../Volo/CmsKit/Blogs/BlogFeatureManager.cs | 36 ++++++++++++++++++- .../Volo/CmsKit/Blogs/IBlogFeatureManager.cs | 2 ++ 3 files changed, 39 insertions(+), 20 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs index d3fbdb5cb5..c712ea5048 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs @@ -41,26 +41,9 @@ namespace Volo.CmsKit.Admin.Blogs } [Authorize(CmsKitAdminPermissions.Blogs.Features)] - public async Task SetAsync(Guid blogId, BlogFeatureInputDto dto) + public Task SetAsync(Guid blogId, BlogFeatureInputDto dto) { - var blogFeature = await BlogFeatureRepository.FindAsync(blogId, dto.FeatureName); - if (blogFeature == null) - { - var newBlogFeature = new BlogFeature(blogId, dto.FeatureName, dto.IsEnabled); - await BlogFeatureRepository.InsertAsync(newBlogFeature); - } - else - { - blogFeature.IsEnabled = dto.IsEnabled; - await BlogFeatureRepository.UpdateAsync(blogFeature); - } - - await EventBus.PublishAsync(new BlogFeatureChangedEto - { - BlogId = blogId, - FeatureName = dto.FeatureName, - IsEnabled = dto.IsEnabled - }); + return BlogFeatureManager.SetAsync(blogId, dto.FeatureName, dto.IsEnabled); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs index c1ccb0f16f..baeca63485 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeatureManager.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Domain.Services; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.Uow; namespace Volo.CmsKit.Blogs { @@ -11,12 +13,20 @@ namespace Volo.CmsKit.Blogs protected IDefaultBlogFeatureProvider DefaultBlogFeatureProvider { get; } + protected IUnitOfWorkManager UnitOfWorkManager { get; } + + protected IDistributedEventBus EventBus { get; } + public BlogFeatureManager( IBlogFeatureRepository blogFeatureRepository, - IDefaultBlogFeatureProvider defaultBlogFeatureProvider) + IDefaultBlogFeatureProvider defaultBlogFeatureProvider, + IUnitOfWorkManager unitOfWorkManager, + IDistributedEventBus eventBus) { BlogFeatureRepository = blogFeatureRepository; DefaultBlogFeatureProvider = defaultBlogFeatureProvider; + UnitOfWorkManager = unitOfWorkManager; + EventBus = eventBus; } public async Task> GetListAsync(Guid blogId) @@ -29,5 +39,29 @@ namespace Volo.CmsKit.Blogs return blogFeatures; } + + public async Task SetAsync(Guid blogId, string featureName, bool isEnabled) + { + var blogFeature = await BlogFeatureRepository.FindAsync(blogId, featureName); + if (blogFeature == null) + { + var newBlogFeature = new BlogFeature(blogId, featureName, isEnabled); + await BlogFeatureRepository.InsertAsync(newBlogFeature); + } + else + { + blogFeature.IsEnabled = isEnabled; + await BlogFeatureRepository.UpdateAsync(blogFeature); + } + + await UnitOfWorkManager.Current.SaveChangesAsync(); + + await EventBus.PublishAsync(new BlogFeatureChangedEto + { + BlogId = blogId, + FeatureName = featureName, + IsEnabled = isEnabled + }); + } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureManager.cs index 87e721a913..74ffefafd4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/IBlogFeatureManager.cs @@ -11,5 +11,7 @@ namespace Volo.CmsKit.Blogs public interface IBlogFeatureManager : IDomainService { Task> GetListAsync(Guid blogId); + + Task SetAsync(Guid blogId, string featureName, bool isEnabled); } } From c596f8d90f8dde3ba76a72e791aeb6808a53f17c Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 23 Feb 2021 11:17:54 +0800 Subject: [PATCH 106/126] Make GetAllAsync method of SettingProvider virtual. Close #7810 --- .../src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs index 52ef5c50de..401a527b1f 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs @@ -43,7 +43,7 @@ namespace Volo.Abp.Settings return value; } - public async Task> GetAllAsync(string[] names) + public virtual async Task> GetAllAsync(string[] names) { var result = new Dictionary(); var settingDefinitions = SettingDefinitionManager.GetAll().Where(x => names.Contains(x.Name)).ToList(); From d07230910b15b3f723574b1b4906455f2c25b19e Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 23 Feb 2021 13:25:34 +0800 Subject: [PATCH 107/126] Use ApplicationApiDescriptionModel.Create insetad of new. Resolve #7815 --- .../Volo/Abp/Http/Modeling/ApplicationApiDescriptionModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ApplicationApiDescriptionModel.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ApplicationApiDescriptionModel.cs index 77fb28eed5..92f844dd3c 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ApplicationApiDescriptionModel.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ApplicationApiDescriptionModel.cs @@ -43,7 +43,7 @@ namespace Volo.Abp.Http.Modeling public ApplicationApiDescriptionModel CreateSubModel(string[] modules = null, string[] controllers = null, string[] actions = null) { - var subModel = new ApplicationApiDescriptionModel(); + var subModel = ApplicationApiDescriptionModel.Create();; foreach (var module in Modules.Values) { From 105d7fd542029455b512279e316c0e7859fda84f Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 23 Feb 2021 14:21:18 +0800 Subject: [PATCH 108/126] Use controller type as key. --- .../Mvc/AspNetCoreApiDescriptionModelProvider.cs | 1 - .../Abp/Http/Modeling/ModuleApiDescriptionModel.cs | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs index 135b506e69..1710fd5bd7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs @@ -84,7 +84,6 @@ namespace Volo.Abp.AspNetCore.Mvc ); var controllerModel = moduleModel.GetOrAddController( - controllerType.FullName, _options.ControllerNameGenerator(controllerType, setting), controllerType, _modelOptions.IgnoredInterfaces diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs index 5c7c53745c..62365b898b 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ModuleApiDescriptionModel.cs @@ -41,17 +41,17 @@ namespace Volo.Abp.Http.Modeling public ControllerApiDescriptionModel AddController(ControllerApiDescriptionModel controller) { - if (Controllers.ContainsKey(controller.ControllerName)) + if (Controllers.ContainsKey(controller.Type)) { - throw new AbpException($"There is already a controller with name: {controller.ControllerName} in module: {RootPath}"); + throw new AbpException($"There is already a controller with type: {controller.Type} in module: {RootPath}"); } - return Controllers[controller.ControllerName] = controller; + return Controllers[controller.Type] = controller; } - public ControllerApiDescriptionModel GetOrAddController(string uniqueName, string name, Type type, [CanBeNull] HashSet ignoredInterfaces = null) + public ControllerApiDescriptionModel GetOrAddController(string name, Type type, [CanBeNull] HashSet ignoredInterfaces = null) { - return Controllers.GetOrAdd(uniqueName, () => ControllerApiDescriptionModel.Create(name, type, ignoredInterfaces)); + return Controllers.GetOrAdd(type.FullName, () => ControllerApiDescriptionModel.Create(name, type, ignoredInterfaces)); } public ModuleApiDescriptionModel CreateSubModel(string[] controllers, string[] actions) From 4602d1aa97760db0ac6336320f27e2e9f03e7e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkay=20=C4=B0lknur?= Date: Tue, 23 Feb 2021 09:25:18 +0300 Subject: [PATCH 109/126] Add not null attribute Co-authored-by: Enis Necipoglu --- modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs index 4b0ba20e30..4b9aeebde1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs @@ -31,7 +31,7 @@ namespace Volo.CmsKit.Tags TenantId = tenantId; } - public virtual void SetName(string name) + public virtual void SetName([NotNull] string name) { Name = Check.NotNullOrEmpty(name, nameof(name), TagConsts.MaxNameLength); } From 0b2c931bec3f0b590f9cffd27a3aede128d6cf43 Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 23 Feb 2021 09:57:37 +0300 Subject: [PATCH 110/126] CmsKit - Move include to WithDetails method --- .../Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs index e67427245e..2d63451464 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs @@ -27,10 +27,9 @@ namespace Volo.CmsKit.Blogs { Check.NotNullOrEmpty(slug, nameof(slug)); - var dbSet = await GetDbSetAsync(); + var dbSet = await WithDetailsAsync(); return await dbSet - .Include(i => i.Creator) .Where(x => x.BlogId == blogId && x.Slug.ToLower() == slug) .FirstOrDefaultAsync(cancellationToken: GetCancellationToken(cancellationToken)) @@ -47,8 +46,7 @@ namespace Volo.CmsKit.Blogs public async Task> GetPagedListAsync(Guid blogId, int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) { - var queryable = (await GetQueryableAsync()) - .Include(i => i.Creator) + var queryable = (await WithDetailsAsync()) .Where(x => x.BlogId == blogId); if (!sorting.IsNullOrWhiteSpace()) @@ -67,9 +65,15 @@ namespace Volo.CmsKit.Blogs { Check.NotNullOrEmpty(slug, nameof(slug)); - var dbSet = await GetDbSetAsync(); + var dbSet = await WithDetailsAsync(); return await dbSet.AnyAsync(x => x.BlogId == blogId && x.Slug.ToLower() == slug, GetCancellationToken(cancellationToken)); } + + public override async Task> WithDetailsAsync() + { + var dbSet = await GetDbSetAsync(); + return dbSet.Include(i => i.Creator); + } } } \ No newline at end of file From 9a81666557e07162043b6854b3195e1557d51672 Mon Sep 17 00:00:00 2001 From: Alper Ebicoglu Date: Tue, 23 Feb 2021 10:10:50 +0300 Subject: [PATCH 111/126] refactor CreateMigrationAndRunMigratorCommand.cs --- .../CreateMigrationAndRunMigratorCommand.cs | 58 ++++++++++--------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigratorCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigratorCommand.cs index 3946ca35bb..68fae779ce 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigratorCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CreateMigrationAndRunMigratorCommand.cs @@ -23,60 +23,66 @@ namespace Volo.Abp.Cli.Commands { if (commandLineArgs.Target.IsNullOrEmpty()) { - throw new CliUsageException( - "DbMigrations folder path is missing!" - ); + throw new CliUsageException("DbMigrations folder path is missing!"); } var dbMigratorProjectPath = GetDbMigratorProjectPath(commandLineArgs.Target); - if (dbMigratorProjectPath == null) { throw new Exception("DbMigrator is not found!"); } - await CheckAndInstallDotnetEfIfNeededAsync(); + if (!IsDotNetEfToolInstalled()) + { + InstallDotnetEfTool(); + } - var output = CmdHelper.RunCmdAndGetOutput($"cd \"{commandLineArgs.Target}\" && dotnet ef migrations add Initial -s \"{dbMigratorProjectPath}\""); + var addMigrationCmd = $"cd \"{commandLineArgs.Target}\" && " + + $"dotnet ef migrations add Initial -s \"{dbMigratorProjectPath}\""; - if (output.Contains("Done.") && output.Contains("To undo this action") && output.Contains("ef migrations remove")) // Migration added successfully + var output = CmdHelper.RunCmdAndGetOutput(addMigrationCmd); + if (output.Contains("Done.") && + output.Contains("To undo this action") && + output.Contains("ef migrations remove")) { + // Migration added successfully CmdHelper.RunCmd("cd \"" + Path.GetDirectoryName(dbMigratorProjectPath) + "\" && dotnet run"); + await Task.CompletedTask; } else { - throw new Exception("Migrations failed: " + output); + var exceptionMsg = "Migrations failed! The following command didn't run successfully:" + + Environment.NewLine + + addMigrationCmd + + Environment.NewLine + output; + + Logger.LogError(exceptionMsg); + throw new Exception(exceptionMsg); } } - private async Task CheckAndInstallDotnetEfIfNeededAsync() + private static bool IsDotNetEfToolInstalled() { var output = CmdHelper.RunCmdAndGetOutput("dotnet tool list -g"); + return output.Contains("dotnet-ef"); + } - if (output.Contains("dotnet-ef")) - { - return; - } - + private void InstallDotnetEfTool() + { Logger.LogInformation("Installing dotnet-ef tool..."); - CmdHelper.RunCmd("dotnet tool install --global dotnet-ef"); - Logger.LogInformation("dotnet-ef tool is installed."); } - private string GetDbMigratorProjectPath(string dbMigrationsFolderPath) + private static string GetDbMigratorProjectPath(string dbMigrationsFolderPath) { var srcFolder = Directory.GetParent(dbMigrationsFolderPath); + var dbMigratorDirectory = Directory.GetDirectories(srcFolder.FullName) + .FirstOrDefault(d => d.EndsWith(".DbMigrator")); - var dbMigratorFolderPath = Directory.GetDirectories(srcFolder.FullName).FirstOrDefault(d => d.EndsWith(".DbMigrator")); - - if (dbMigratorFolderPath == null) - { - return null; - } - - return Directory.GetFiles(dbMigratorFolderPath).FirstOrDefault(f => f.EndsWith(".csproj")); + return dbMigratorDirectory == null + ? null + : Directory.GetFiles(dbMigratorDirectory).FirstOrDefault(f => f.EndsWith(".csproj")); } public string GetUsageInfo() @@ -89,4 +95,4 @@ namespace Volo.Abp.Cli.Commands return string.Empty; } } -} +} \ No newline at end of file From 2dec789493488c5271ace678e742cd3f53109e3d Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 23 Feb 2021 10:19:15 +0300 Subject: [PATCH 112/126] CmsKit - Update usage of WithDetailsAsync --- .../Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs index 2d63451464..b914b4ad01 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs @@ -27,9 +27,7 @@ namespace Volo.CmsKit.Blogs { Check.NotNullOrEmpty(slug, nameof(slug)); - var dbSet = await WithDetailsAsync(); - - return await dbSet + return await (await WithDetailsAsync()) .Where(x => x.BlogId == blogId && x.Slug.ToLower() == slug) .FirstOrDefaultAsync(cancellationToken: GetCancellationToken(cancellationToken)) @@ -65,15 +63,13 @@ namespace Volo.CmsKit.Blogs { Check.NotNullOrEmpty(slug, nameof(slug)); - var dbSet = await WithDetailsAsync(); - return await dbSet.AnyAsync(x => x.BlogId == blogId && x.Slug.ToLower() == slug, + return await (await WithDetailsAsync()).AnyAsync(x => x.BlogId == blogId && x.Slug.ToLower() == slug, GetCancellationToken(cancellationToken)); } public override async Task> WithDetailsAsync() { - var dbSet = await GetDbSetAsync(); - return dbSet.Include(i => i.Creator); + return (await GetDbSetAsync()).Include(i => i.Creator); } } } \ No newline at end of file From 5dd1db0823c729db949229c5622586f7493a0641 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Tue, 23 Feb 2021 10:23:32 +0300 Subject: [PATCH 113/126] remove duplicate BookModule heading --- docs/en/Tutorials/Part-2.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index 7bc42b1fc9..5ec23ba43a 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -344,8 +344,6 @@ It's time to create something visible and usable! There are some tools that we w - [Ng Bootstrap](https://ng-bootstrap.github.io/#/home) will be used as the UI component library. - [Ngx-Datatable](https://swimlane.gitbook.io/ngx-datatable/) will be used as the datatable library. -### BookModule - Run the following command line to create a new module, named `BookModule` in the root folder of the angular application: ```bash From 5a96082252878e38b1dc8412e0f1fd2a26e76dcc Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Tue, 23 Feb 2021 10:25:21 +0300 Subject: [PATCH 114/126] remove dot before image paths --- docs/en/Tutorials/Part-2.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index 5ec23ba43a..1987ca7e7a 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -103,7 +103,7 @@ Before starting to the UI development, we first want to prepare the localization Localization texts are located under the `Localization/BookStore` folder of the `Acme.BookStore.Domain.Shared` project: -![bookstore-localization-files](./images/bookstore-localization-files-v2.png) +![bookstore-localization-files](images/bookstore-localization-files-v2.png) Open the `en.json` (*the English translations*) file and change the content as below: @@ -157,7 +157,7 @@ It's time to create something visible and usable! Instead of classic MVC, we wil Create `Books` folder under the `Pages` folder of the `Acme.BookStore.Web` project. Add a new Razor Page by right clicking the Books folder then selecting **Add > Razor Page** menu item. Name it as `Index`: -![bookstore-add-index-page](./images/bookstore-add-index-page-v2.png) +![bookstore-add-index-page](images/bookstore-add-index-page-v2.png) Open the `Index.cshtml` and change the whole content as shown below: @@ -208,7 +208,7 @@ context.Menu.AddItem( Run the project, login to the application with the username `admin` and the password `1q2w3E*` and see the new menu item has been added to the main menu: -![bookstore-menu-items](./images/bookstore-new-menu-item.png) +![bookstore-menu-items](images/bookstore-new-menu-item.png) When you click to the Books menu item under the Book Store parent, you are being redirected to the new empty Books Page. @@ -250,7 +250,7 @@ Change the `Pages/Books/Index.cshtml` as following: Create an `Index.js` file under the `Pages/Books` folder: -![bookstore-index-js-file](./images/bookstore-index-js-file-v3.png) +![bookstore-index-js-file](images/bookstore-index-js-file-v3.png) The content of the file is shown below: @@ -455,7 +455,7 @@ abp generate-proxy This command will create the following files under the `/src/app/proxy/books` folder: -![Generated files](./images/generated-proxies-3.png) +![Generated files](images/generated-proxies-3.png) ### BookComponent @@ -529,7 +529,7 @@ Open the `/src/app/book/book.component.html` and replace the content as below: Now you can see the final result on your browser: -![Book list final result](./images/bookstore-book-list.png) +![Book list final result](images/bookstore-book-list.png) {{else if UI == "Blazor"}} From 7fda88a486fd8583e13ad6c79d4380eb3d994a72 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Tue, 23 Feb 2021 10:29:56 +0300 Subject: [PATCH 115/126] make list service link in tutorial relative --- docs/en/Tutorials/Part-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index 1987ca7e7a..627b55a476 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -488,7 +488,7 @@ export class BookComponent implements OnInit { ``` * We imported and injected the generated `BookService`. -* We are using the [ListService](https://docs.abp.io/en/abp/latest/UI/Angular/List-Service), a utility service of the ABP Framework which provides easy pagination, sorting and searching. +* We are using the [ListService](../UI/Angular/List-Service.md), a utility service of the ABP Framework which provides easy pagination, sorting and searching. Open the `/src/app/book/book.component.html` and replace the content as below: From 3e9e90e3d0da714faa616ffcc31dc0c9bb30bb4f Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Tue, 23 Feb 2021 11:21:35 +0300 Subject: [PATCH 116/126] remove dot before image paths --- docs/en/Tutorials/Part-3.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index e58857ec89..1190c31b0f 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -48,13 +48,13 @@ This part is also recorded as a video tutorial and ** Date: Tue, 23 Feb 2021 11:22:08 +0300 Subject: [PATCH 117/126] avoid confusion about bookTypeOptions import comment --- docs/en/Tutorials/Part-3.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index 1190c31b0f..ec326ddb65 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -732,8 +732,7 @@ Open `/src/app/book/book.component.ts` and replace the content as below: ```js import { ListService, PagedResultDto } from '@abp/ng.core'; import { Component, OnInit } from '@angular/core'; -// import bookTypeOptions from @proxy/books -import { BookService, BookDto, bookTypeOptions } from '@proxy/books'; +import { BookService, BookDto, bookTypeOptions } from '@proxy/books'; // add bookTypeOptions import { FormGroup, FormBuilder, Validators } from '@angular/forms'; // add this @Component({ From 7539e9b3aaad1577252610ceb9175df96698295e Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Tue, 23 Feb 2021 12:37:00 +0300 Subject: [PATCH 118/126] fix note about localization key names --- docs/en/Tutorials/Part-5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Tutorials/Part-5.md b/docs/en/Tutorials/Part-5.md index 29374419cb..213dd8821b 100644 --- a/docs/en/Tutorials/Part-5.md +++ b/docs/en/Tutorials/Part-5.md @@ -117,7 +117,7 @@ Finally, edit the localization file (`en.json` under the `Localization/BookStore "Permission:Books.Delete": "Deleting the books" ```` -> Localization key names are arbitrary and no forcing rule. But we prefer the convention used above. +> Localization key names are arbitrary and there is no forcing rule. But we prefer the convention used above. ### Permission Management UI From 5212e4409f3ce0468af6e1ff354d42ac07348dd0 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 23 Feb 2021 12:39:18 +0300 Subject: [PATCH 119/126] Checkin repliedComment on comment creating --- .../Volo/CmsKit/Public/Comments/CommentPublicAppService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs index a4ce4a2b46..f283473f95 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs @@ -52,6 +52,11 @@ namespace Volo.CmsKit.Public.Comments { var user = await CmsUserLookupService.GetByIdAsync(CurrentUser.GetId()); + if(input.RepliedCommentId.HasValue) + { + await CommentRepository.GetAsync(input.RepliedCommentId.Value); + } + var comment = await CommentRepository.InsertAsync( new Comment( GuidGenerator.Create(), From 9d65eb81ddfba35749d69e2308451669af5bf44f Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Tue, 23 Feb 2021 12:45:04 +0300 Subject: [PATCH 120/126] fix spelling and grammar --- docs/en/Tutorials/Part-6.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/Tutorials/Part-6.md b/docs/en/Tutorials/Part-6.md index 69c6574520..d5df8133b7 100644 --- a/docs/en/Tutorials/Part-6.md +++ b/docs/en/Tutorials/Part-6.md @@ -124,7 +124,7 @@ Created this class inside the `Acme.BookStore.Domain.Shared` project since we wi ## AuthorManager: The Domain Service -`Author` constructor and `ChangeName` method is `internal`, so they can be usable only in the domain layer. Create an `AuthorManager` class in the `Authors` folder (namespace) of the `Acme.BookStore.Domain` project: +`Author` constructor and `ChangeName` methods are `internal`, so they can be used only in the domain layer. Create an `AuthorManager` class in the `Authors` folder (namespace) of the `Acme.BookStore.Domain` project: ````csharp using System; @@ -186,7 +186,7 @@ namespace Acme.BookStore.Authors * `AuthorManager` forces to create an author and change name of an author in a controlled way. The application layer (will be introduced later) will use these methods. -> **DDD tip**: Do not introduce domain service methods unless they are really needed and perform some core business rules. For this case, we needed to this service to be able to force the unique name constraint. +> **DDD tip**: Do not introduce domain service methods unless they are really needed and perform some core business rules. For this case, we needed this service to be able to force the unique name constraint. Both methods checks if there is already an author with the given name and throws a special business exception, `AuthorAlreadyExistsException`, defined in the `Acme.BookStore.Domain` project (in the `Authors` folder) as shown below: @@ -226,7 +226,7 @@ This is a unique string represents the error code thrown by your application and "BookStore:00001": "There is already an author with the same name: {name}" ```` -Whenever you throw an `AuthorAlreadyExistsException`, the end use will see a this message on the UI. +Whenever you throw an `AuthorAlreadyExistsException`, the end user will see a nice error message on the UI. ## IAuthorRepository From 74cd9da7c70a5e3b5997930a83b72f49128bd334 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 23 Feb 2021 13:03:42 +0300 Subject: [PATCH 121/126] add a document titled How Replaceable Components Work with Extensions --- ...aceable-Components-Work-with-Extensions.md | 288 ++++++++++++++++++ .../my-roles-component-form-extensions.jpg | Bin 0 -> 57069 bytes .../my-roles-component-with-extensions.jpg | Bin 0 -> 60822 bytes 3 files changed, 288 insertions(+) create mode 100644 docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md create mode 100644 docs/en/UI/Angular/images/my-roles-component-form-extensions.jpg create mode 100644 docs/en/UI/Angular/images/my-roles-component-with-extensions.jpg diff --git a/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md b/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md new file mode 100644 index 0000000000..84425667c7 --- /dev/null +++ b/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md @@ -0,0 +1,288 @@ +# How Replaceable Components Work with Extensions + +Additional UI extensibility points ([Entity action extensions](https://docs.abp.io/en/abp/latest/UI/Angular/Entity-Action-Extensions), [data table column extensions](https://docs.abp.io/en/abp/latest/UI/Angular/Data-Table-Column-Extensions), [page toolbar extensions](https://docs.abp.io/en/abp/latest/UI/Angular/Page-Toolbar-Extensions) and others) are used in ABP pages to allow to control entity actions, table columns and page toolbar of a page. If you replace a page, you need to apply some configurations to be able to work extension components in your component. Let's see how to do this by replacing the roles page. + +Create a new module called `MyRolesModule`: + +```bash +yarn ng generate module my-roles --module app +``` + +Create a new component called `MyRolesComponent`: + +```bash +yarn ng generate component my-roles/my-roles --flat --export +``` + +Open the generated `src/app/my-roles/my-roles.component.ts` file and replace its content with the following: + +```js +import { ListService, PagedAndSortedResultRequestDto } from '@abp/ng.core'; +import { + CreateRole, + DeleteRole, + eIdentityComponents, + GetRoleById, + GetRoles, + IdentityRoleDto, + IdentityState, + RolesComponent, + UpdateRole, +} from '@abp/ng.identity'; +import { ePermissionManagementComponents } from '@abp/ng.permission-management'; +import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared'; +import { + EXTENSIONS_IDENTIFIER, + FormPropData, + generateFormFromProps, +} from '@abp/ng.theme.shared/extensions'; +import { Component, Injector, OnInit } from '@angular/core'; +import { FormGroup } from '@angular/forms'; +import { Select, Store } from '@ngxs/store'; +import { Observable } from 'rxjs'; +import { finalize, pluck } from 'rxjs/operators'; + +@Component({ + selector: 'app-my-roles', + templateUrl: './my-roles.component.html', + providers: [ + ListService, + { + provide: EXTENSIONS_IDENTIFIER, + useValue: eIdentityComponents.Roles, + }, + { provide: RolesComponent, useExisting: MyRolesComponent }, + ], +}) +export class MyRolesComponent implements OnInit { + @Select(IdentityState.getRoles) + data$: Observable; + + @Select(IdentityState.getRolesTotalCount) + totalCount$: Observable; + + form: FormGroup; + + selected: IdentityRoleDto; + + isModalVisible: boolean; + + visiblePermissions = false; + + providerKey: string; + + modalBusy = false; + + permissionManagementKey = ePermissionManagementComponents.PermissionManagement; + + onVisiblePermissionChange = event => { + this.visiblePermissions = event; + }; + + constructor( + public readonly list: ListService, + protected confirmationService: ConfirmationService, + protected store: Store, + protected injector: Injector + ) {} + + ngOnInit() { + this.hookToQuery(); + } + + buildForm() { + const data = new FormPropData(this.injector, this.selected); + this.form = generateFormFromProps(data); + } + + openModal() { + this.buildForm(); + this.isModalVisible = true; + } + + add() { + this.selected = {} as IdentityRoleDto; + this.openModal(); + } + + edit(id: string) { + this.store + .dispatch(new GetRoleById(id)) + .pipe(pluck('IdentityState', 'selectedRole')) + .subscribe(selectedRole => { + this.selected = selectedRole; + this.openModal(); + }); + } + + save() { + if (!this.form.valid) return; + this.modalBusy = true; + + this.store + .dispatch( + this.selected.id + ? new UpdateRole({ ...this.selected, ...this.form.value, id: this.selected.id }) + : new CreateRole(this.form.value) + ) + .pipe(finalize(() => (this.modalBusy = false))) + .subscribe(() => { + this.isModalVisible = false; + this.list.get(); + }); + } + + delete(id: string, name: string) { + this.confirmationService + .warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', { + messageLocalizationParams: [name], + }) + .subscribe((status: Confirmation.Status) => { + if (status === Confirmation.Status.confirm) { + this.store.dispatch(new DeleteRole(id)).subscribe(() => this.list.get()); + } + }); + } + + private hookToQuery() { + this.list.hookToQuery(query => this.store.dispatch(new GetRoles(query))).subscribe(); + } + + openPermissionsModal(providerKey: string) { + this.providerKey = providerKey; + setTimeout(() => { + this.visiblePermissions = true; + }, 0); + } + + sort(data) { + const { prop, dir } = data.sorts[0]; + this.list.sortKey = prop; + this.list.sortOrder = dir; + } +} +``` + +```js + { + provide: EXTENSIONS_IDENTIFIER, + useValue: eIdentityComponents.Roles, + }, + { + provide: RolesComponent, + useExisting: MyRolesComponent + } +``` + +The two providers we have defined in `MyRolesComponent` are required for the extension components to work correctly. + +* With the first provider, we defined the extension identifier for using `RolesComponent`'s extension actions in the `MyRolesComponent`. +* With the second provider, we have replaced the `RolesComponent` injection with the `MyRolesComponent`. Default extension actions of the `RolesComponent` try to get `RolesComponent` instance. However, the actions can get the `MyRolesComponent` instance after defining the second provider. + +Open the generated `src/app/my-role/my-role.component.html` file and replace its content with the following: + +```html +
+
+
+
+
My Roles
+
+
+ +
+
+
+ +
+ +
+
+ + + +

{%{{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}}%}

+
+ + +
+ +
+
+ + + + {%{{{ + 'AbpIdentity::Save' | abpLocalization + }}}%} + +
+ + + +``` + +We have added the `abp-page-toolbar`, `abp-extensible-table`, and `abp-extensible-form` extension components to template of the `MyRolesComponent`. + +You should import the required modules for the `MyRolesComponent` to `MyRolesModule`. Open the `src/my-roles/my-roles.module.ts` file and replace the content with the following: + +```ts +import { UiExtensionsModule } from '@abp/ng.theme.shared/extensions'; +import { NgModule } from '@angular/core'; +import { SharedModule } from '../shared/shared.module'; +import { MyRolesComponent } from './my-roles.component'; +import { PermissionManagementModule } from '@abp/ng.permission-management'; + +@NgModule({ + declarations: [MyRolesComponent], + imports: [SharedModule, UiExtensionsModule, PermissionManagementModule], + exports: [MyRolesComponent], +}) +export class MyRolesModule {} +``` + +- `UiExtensionsModule` imported to be able to use the extension components in your component. +- `PermissionManagementModule` imported to be able to use the `abp-permission-*management` in your component. + +As the last step, it is needs to be replaced the `RolesComponent` with the `MyRolesComponent`. Open the `app.component.ts` and modify its content as shown below: + +```js +import { ReplaceableComponentsService } from '@abp/ng.core'; +import { eIdentityComponents } from '@abp/ng.identity'; +import { MyRolesComponent } from './my-roles/my-roles.component'; + +@Component(/* component metadata */) +export class AppComponent { + constructor(private replaceableComponents: ReplaceableComponentsService) { + this.replaceableComponents.add({ component: MyRolesComponent, key: eIdentityComponents.Roles }); + } +} +``` + +After the steps above, the `RolesComponent` has been successfully replaced with the `MyRolesComponent`. When you navigate to the `/identity/roles` URL, you will see the `MyRolesComponent`'s template and see the extension components working correctly. + +![my-roles-component-with-extensions](./images/my-roles-component-with-extensions.jpg) + +![my-roles-component-form-extensions](./images/my-roles-component-form-extensions.jpg) \ No newline at end of file diff --git a/docs/en/UI/Angular/images/my-roles-component-form-extensions.jpg b/docs/en/UI/Angular/images/my-roles-component-form-extensions.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a686d26edc665ca29e92ae3329d5503bed2fda1f GIT binary patch literal 57069 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 literal 0 HcmV?d00001 diff --git a/docs/en/UI/Angular/images/my-roles-component-with-extensions.jpg b/docs/en/UI/Angular/images/my-roles-component-with-extensions.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1ac82c40b72967365d6d80e71855c7d8a5f4d314 GIT binary patch literal 60822 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 Q>>{v>!2cTr_J0%p8#Eedm;e9( literal 0 HcmV?d00001 From da9427d98df80d4712108a3960a8cedc6ea5037d Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 23 Feb 2021 13:05:03 +0300 Subject: [PATCH 122/126] add a document link to the see also section of component replacement --- docs/en/UI/Angular/Component-Replacement.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/UI/Angular/Component-Replacement.md b/docs/en/UI/Angular/Component-Replacement.md index 54a1869c0e..0010a30a2f 100644 --- a/docs/en/UI/Angular/Component-Replacement.md +++ b/docs/en/UI/Angular/Component-Replacement.md @@ -546,4 +546,5 @@ The final UI looks like below: ## See Also +- [How Replaceable Components Work with Extensions](./How-Replaceable-Components-Work-with-Extensions.md) - [How to Replace PermissionManagementComponent](./Permission-Management-Component-Replacement.md) From d8334b87acc8f216b1b5a896fa194373b370d0e9 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 23 Feb 2021 13:06:07 +0300 Subject: [PATCH 123/126] add extensions menu element --- docs/en/docs-nav.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index c0a4d4d2bc..369d14371c 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -847,6 +847,27 @@ { "text": "Custom Setting Page", "path": "UI/Angular/Custom-Setting-Page.md" + }, + { + "text": "Extensions", + "items": [ + { + "text": "Entity Action Extensions", + "path": "UI/Angular/Entity-Action-Extensions.md" + }, + { + "text": "Data Table Column Extensions", + "path": "UI/Angular/Data-Table-Column-Extensions.md" + }, + { + "text": "Page Toolbar Extensions", + "path": "UI/Angular/Page-Toolbar-Extensions.md" + }, + { + "text": "Dynamic Form Extensions", + "path": "UI/Angular/Dynamic-Form-Extensions.md" + } + ] } ] } From fcd634caf9eeac605bcacbac1dd3351fa711d073 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Tue, 23 Feb 2021 14:30:13 +0300 Subject: [PATCH 124/126] CLI: Create a command to list open-source modules resolves https://github.com/abpframework/abp/issues/3161 --- docs/en/CLI.md | 21 +++++ .../Volo/Abp/Cli/AbpCliCoreModule.cs | 1 + .../Abp/Cli/Commands/ListModulesCommand.cs | 83 +++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs diff --git a/docs/en/CLI.md b/docs/en/CLI.md index fc76aa997b..d4a33a2a12 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -31,6 +31,7 @@ Here, the list of all available commands before explaining their details: * **`update`**: Automatically updates all ABP related NuGet and NPM packages in a solution. * **`add-package`**: Adds an ABP package to a project. * **`add-module`**: Adds a [multi-package application module](https://docs.abp.io/en/abp/latest/Modules/Index) to a solution. +* **`list-modules`**: Lists names of open-source application modules. * **`get-source`**: Downloads the source code of a module. * **`generate-proxy`**: Generates client side proxies to use HTTP API endpoints. * **`remove-proxy`**: Removes previously generated client side proxies. @@ -202,6 +203,26 @@ abp add-module ProductManagement --new --add-to-solution-file * `--with-source-code`: Downloads the source code of the module to your solution folder and uses local project references instead of NuGet/NPM packages. This options is always `True` if `--new` is used. * `--add-to-solution-file`: Adds the downloaded/created module to your solution file, so you will also see the projects of the module when you open the solution on a IDE. (only available when `--with-source-code` is `True`.) +### list-modules + +Lists names of open-source application modules. + +Usage + +````bash +abp list-modules [options] +```` + +Example: + +```bash +abp list-modules +``` + +#### Options + +* `--include-pro-modules`: Includes commercial (pro) modules in the output. + ### get-source Downloads the source code of a module to your computer. diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs index 6b23857233..f6afda5809 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs @@ -34,6 +34,7 @@ namespace Volo.Abp.Cli options.Commands["update"] = typeof(UpdateCommand); options.Commands["add-package"] = typeof(AddPackageCommand); options.Commands["add-module"] = typeof(AddModuleCommand); + options.Commands["list-modules"] = typeof(ListModulesCommand); options.Commands["login"] = typeof(LoginCommand); options.Commands["logout"] = typeof(LogoutCommand); options.Commands[GenerateProxyCommand.Name] = typeof(GenerateProxyCommand); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs new file mode 100644 index 0000000000..cb05a19031 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs @@ -0,0 +1,83 @@ +using System; +using System.IO; +using System.Linq; +using System.Text; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using System.Threading.Tasks; +using Volo.Abp.Cli.Args; +using Volo.Abp.Cli.ProjectBuilding; +using Volo.Abp.Cli.ProjectBuilding.Templates.MvcModule; +using Volo.Abp.Cli.ProjectModification; +using Volo.Abp.Cli.Utils; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli.Commands +{ + public class ListModulesCommand : IConsoleCommand, ITransientDependency + { + public ModuleInfoProvider ModuleInfoProvider { get; } + public ILogger Logger { get; set; } + + + public ListModulesCommand(ModuleInfoProvider moduleInfoProvider) + { + ModuleInfoProvider = moduleInfoProvider; + Logger = NullLogger.Instance; + } + + public async Task ExecuteAsync(CommandLineArgs commandLineArgs) + { + var modules = await ModuleInfoProvider.GetModuleListAsync(); + var freeModules = modules.Where(m => !m.IsPro).ToList(); + var proModules = modules.Where(m => m.IsPro).ToList(); + + var output = new StringBuilder(Environment.NewLine); + output.AppendLine("Open Source Application Modules"); + output.AppendLine(); + + foreach (var module in freeModules) + { + output.AppendLine($"> {module.DisplayName.PadRight(50)} ({module.Name})"); + } + + if (commandLineArgs.Options.ContainsKey("include-pro-modules")) + { + output.AppendLine(); + output.AppendLine("Commercial (Pro) Application Modules"); + output.AppendLine(); + foreach (var module in proModules) + { + output.AppendLine($"> {module.DisplayName.PadRight(50)} ({module.Name})"); + } + } + + Logger.LogInformation(output.ToString()); + } + + public string GetUsageInfo() + { + var sb = new StringBuilder(); + + sb.AppendLine(""); + sb.AppendLine("'list-modules' command is used for listing open source application modules."); + sb.AppendLine(""); + sb.AppendLine("Usage:"); + sb.AppendLine(" abp list-modules"); + sb.AppendLine(" abp list-modules --include-pro-modules"); + sb.AppendLine(""); + sb.AppendLine("Options:"); + sb.AppendLine(" --include-pro-modules Includes commercial (pro) modules in the output."); + sb.AppendLine(""); + sb.AppendLine("See the documentation for more info: https://docs.abp.io/en/abp/latest/CLI"); + + return sb.ToString(); + } + + public string GetShortDescription() + { + return "List open source application modules"; + } + + } +} From 50319ad7d3274849dfd5debed93f8666bcfa28b0 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Tue, 23 Feb 2021 14:32:50 +0300 Subject: [PATCH 125/126] Update ListModulesCommand.cs --- .../Volo/Abp/Cli/Commands/ListModulesCommand.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs index cb05a19031..ed201d77d7 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ListModulesCommand.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Linq; using System.Text; using Microsoft.Extensions.Logging; @@ -7,9 +6,6 @@ using Microsoft.Extensions.Logging.Abstractions; using System.Threading.Tasks; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.ProjectBuilding; -using Volo.Abp.Cli.ProjectBuilding.Templates.MvcModule; -using Volo.Abp.Cli.ProjectModification; -using Volo.Abp.Cli.Utils; using Volo.Abp.DependencyInjection; namespace Volo.Abp.Cli.Commands From 6ef507a278956996b9802f091d391a0f111a236e Mon Sep 17 00:00:00 2001 From: Mehmet Erim <34455572+mehmet-erim@users.noreply.github.com> Date: Tue, 23 Feb 2021 15:42:25 +0300 Subject: [PATCH 126/126] Update How-Replaceable-Components-Work-with-Extensions.md --- .../How-Replaceable-Components-Work-with-Extensions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md b/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md index 84425667c7..d942975646 100644 --- a/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md +++ b/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md @@ -248,7 +248,7 @@ We have added the `abp-page-toolbar`, `abp-extensible-table`, and `abp-extensibl You should import the required modules for the `MyRolesComponent` to `MyRolesModule`. Open the `src/my-roles/my-roles.module.ts` file and replace the content with the following: -```ts +```js import { UiExtensionsModule } from '@abp/ng.theme.shared/extensions'; import { NgModule } from '@angular/core'; import { SharedModule } from '../shared/shared.module'; @@ -285,4 +285,4 @@ After the steps above, the `RolesComponent` has been successfully replaced with ![my-roles-component-with-extensions](./images/my-roles-component-with-extensions.jpg) -![my-roles-component-form-extensions](./images/my-roles-component-form-extensions.jpg) \ No newline at end of file +![my-roles-component-form-extensions](./images/my-roles-component-form-extensions.jpg)