From 0393730eb83f2d2703a8001ac07a1a69c40370ca Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 22 Dec 2020 14:15:13 +0300 Subject: [PATCH 01/54] Add Asp.Net Core environments to .gitignore --- modules/cms-kit/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/cms-kit/.gitignore b/modules/cms-kit/.gitignore index e9589dd2d6..aee8bda8bf 100644 --- a/modules/cms-kit/.gitignore +++ b/modules/cms-kit/.gitignore @@ -251,6 +251,9 @@ paket-files/ .idea/ *.sln.iml +# Asp.NET Core Environments +appsettings.*.json + # CmsKit host/Volo.CmsKit.IdentityServer/Logs/logs.txt host/Volo.CmsKit.HttpApi.Host/Logs/logs.txt From 2ef3635ac57694841e10025475639b78cb4bd83f Mon Sep 17 00:00:00 2001 From: enisn Date: Tue, 22 Dec 2020 14:28:31 +0300 Subject: [PATCH 02/54] Draft Content for CmsKit --- .../Volo/CmsKit/Contents/IContentRenderer.cs | 14 ++++++++++++++ .../Contents/IContentRendererProvider.cs | 15 +++++++++++++++ .../Volo/CmsKit/Contents/PlainTextRenderer.cs | 19 +++++++++++++++++++ .../Volo/CmsKit/Contents/IContent.cs | 7 +++++++ .../Volo/CmsKit/Contents/IEntityContent.cs | 8 ++++++++ .../Volo/CmsKit/Contents/Content.cs | 17 +++++++++++++++++ 6 files changed, 80 insertions(+) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRenderer.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRendererProvider.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/PlainTextRenderer.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IContent.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IEntityContent.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRenderer.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRenderer.cs new file mode 100644 index 0000000000..79efa468d7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRenderer.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents +{ + public interface IContentRenderer + { + Task RenderAsync(string content); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRendererProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRendererProvider.cs new file mode 100644 index 0000000000..5a1f2077e7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRendererProvider.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents +{ + public interface IContentRendererProvider + { + Task GetContentRendererAsync(IEntityContent content); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/PlainTextRenderer.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/PlainTextRenderer.cs new file mode 100644 index 0000000000..4745954037 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/PlainTextRenderer.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; +using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Common.Application.Volo.CmsKit.Contents +{ + public class PlainTextRenderer : IContentRenderer, ITransientDependency + { + public Task RenderAsync(IContent content) + { + return Task.FromResult(content?.Value); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IContent.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IContent.cs new file mode 100644 index 0000000000..e3fce8c01f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IContent.cs @@ -0,0 +1,7 @@ +namespace Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents +{ + public interface IContent + { + string Value { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IEntityContent.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IEntityContent.cs new file mode 100644 index 0000000000..31f5a3299b --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IEntityContent.cs @@ -0,0 +1,8 @@ +namespace Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents +{ + public interface IEntityContent : IContent + { + string EntityType { get; set; } + string EntityId { get; set; } + } +} 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 new file mode 100644 index 0000000000..48ed1bfc34 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Domain.Volo.CmsKit.Contents +{ + public class Content : FullAuditedAggregateRoot + { + public string Value { get; set; } + public string EntityType { get; set; } + public string EntityId { get; set; } + } +} From 0c54b19085041f93ecf77a0d879a9693776c5aaa Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 22 Dec 2020 14:59:53 +0300 Subject: [PATCH 03/54] refactor content entity and added content renderer --- .../Volo/CmsKit/Contents/IContentRenderer.cs | 14 ----------- .../Contents/IContentRendererProvider.cs | 15 ------------ .../Volo/CmsKit/Contents/PlainTextRenderer.cs | 19 --------------- .../Contents/IContentRenderer.cs | 9 +++++++ .../Contents/PlainTextContentRenderer.cs | 13 ++++++++++ .../Volo/CmsKit/Contents/ContentConsts.cs | 15 ++++++++++++ .../Volo/CmsKit/Contents/IContent.cs | 7 ------ .../Volo/CmsKit/Contents/IEntityContent.cs | 8 ------- .../Volo/CmsKit/Contents/Content.cs | 24 +++++++++++++------ .../CmsKit/Contents/IContentRepository.cs | 10 ++++++++ .../Contents/EfCoreContentRepository.cs | 14 +++++++++++ .../Contents/MongoContentRepository.cs | 14 +++++++++++ 12 files changed, 92 insertions(+), 70 deletions(-) delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRenderer.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRendererProvider.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/PlainTextRenderer.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/IContentRenderer.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/PlainTextContentRenderer.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/ContentConsts.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IContent.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IEntityContent.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRenderer.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRenderer.cs deleted file mode 100644 index 79efa468d7..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRenderer.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; - -namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents -{ - public interface IContentRenderer - { - Task RenderAsync(string content); - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRendererProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRendererProvider.cs deleted file mode 100644 index 5a1f2077e7..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentRendererProvider.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; - -namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents -{ - public interface IContentRendererProvider - { - Task GetContentRendererAsync(IEntityContent content); - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/PlainTextRenderer.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/PlainTextRenderer.cs deleted file mode 100644 index 4745954037..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/PlainTextRenderer.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; -using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; -using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; - -namespace Volo.CmsKit.Common.Application.Volo.CmsKit.Contents -{ - public class PlainTextRenderer : IContentRenderer, ITransientDependency - { - public Task RenderAsync(IContent content) - { - return Task.FromResult(content?.Value); - } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/IContentRenderer.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/IContentRenderer.cs new file mode 100644 index 0000000000..af600d0382 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/IContentRenderer.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace Volo.CmsKit.Web.Contents +{ + public interface IContentRenderer + { + Task RenderAsync(string value); + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/PlainTextContentRenderer.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/PlainTextContentRenderer.cs new file mode 100644 index 0000000000..3f839947e3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/PlainTextContentRenderer.cs @@ -0,0 +1,13 @@ +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.CmsKit.Web.Contents +{ + public class PlainTextContentRenderer : IContentRenderer, ITransientDependency + { + public Task RenderAsync(string value) + { + return Task.FromResult(value); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/ContentConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/ContentConsts.cs new file mode 100644 index 0000000000..758a29e81f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/ContentConsts.cs @@ -0,0 +1,15 @@ +using System; +using Volo.CmsKit.Entities; + +namespace Volo.CmsKit.Contents +{ + public static class ContentConsts + { + public static int MaxEntityTypeLength { get; set; } = CmsEntityConsts.MaxEntityTypeLength; + + public static int MaxEntityIdLength { get; set; } = CmsEntityConsts.MaxEntityIdLength; + + // TODO: consider + public static int MaxValueLength = int.MaxValue; + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IContent.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IContent.cs deleted file mode 100644 index e3fce8c01f..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IContent.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents -{ - public interface IContent - { - string Value { get; set; } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IEntityContent.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IEntityContent.cs deleted file mode 100644 index 31f5a3299b..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/IEntityContent.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents -{ - public interface IEntityContent : IContent - { - string EntityType { get; set; } - string EntityId { get; set; } - } -} 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 48ed1bfc34..34546f6111 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 @@ -1,17 +1,27 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using JetBrains.Annotations; +using Volo.Abp; using Volo.Abp.Domain.Entities.Auditing; -using Volo.CmsKit.Domain.Shared.Volo.CmsKit.Contents; -namespace Volo.CmsKit.Domain.Volo.CmsKit.Contents +namespace Volo.CmsKit.Contents { public class Content : FullAuditedAggregateRoot { - public string Value { get; set; } public string EntityType { get; set; } + public string EntityId { get; set; } + + public string Value { get; set; } + + protected Content() + { + + } + public Content(Guid id, [NotNull] string entityType, [NotNull] string entityId, [NotNull] string value) : base(id) + { + EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); + EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); + Value = Check.NotNullOrWhiteSpace(value, nameof(value), ContentConsts.MaxValueLength); + } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs new file mode 100644 index 0000000000..994d2bd4ab --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs @@ -0,0 +1,10 @@ +using System; +using Volo.Abp.Domain.Repositories; + +namespace Volo.CmsKit.Contents +{ + public interface IContentRepository : IBasicRepository + { + + } +} \ No newline at end of file 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 new file mode 100644 index 0000000000..592fccb883 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Contents +{ + public class EfCoreContentRepository : EfCoreRepository, IContentRepository + { + public EfCoreContentRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file 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 new file mode 100644 index 0000000000..e29b53d417 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.MongoDB.Contents +{ + public class MongoContentRepository : MongoDbRepository, IContentRepository + { + public MongoContentRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file From ed34a5faa13642c3ed84a0cd050ae72107765a75 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 22 Dec 2020 15:43:08 +0300 Subject: [PATCH 04/54] Revert "Add Asp.Net Core environments to .gitignore" This reverts commit 0393730eb83f2d2703a8001ac07a1a69c40370ca. --- modules/cms-kit/.gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/cms-kit/.gitignore b/modules/cms-kit/.gitignore index aee8bda8bf..e9589dd2d6 100644 --- a/modules/cms-kit/.gitignore +++ b/modules/cms-kit/.gitignore @@ -251,9 +251,6 @@ paket-files/ .idea/ *.sln.iml -# Asp.NET Core Environments -appsettings.*.json - # CmsKit host/Volo.CmsKit.IdentityServer/Logs/logs.txt host/Volo.CmsKit.HttpApi.Host/Logs/logs.txt From cfaef4c05e5d624e0fa8326e2a39bc53e6b5cfc2 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 23 Dec 2020 10:28:27 +0300 Subject: [PATCH 05/54] Template design of Tags in CmsKit --- .../Volo/CmsKit/Tags/TagConsts.cs | 9 +++++ .../Volo/CmsKit/EntityTags/EntityTag.cs | 35 +++++++++++++++++ .../CmsKit/EntityTags/EntityTagManager.cs | 39 +++++++++++++++++++ .../CmsKit/EntityTags/IEntityTagManager.cs | 15 +++++++ .../CmsKit/EntityTags/IEntityTagRepository.cs | 14 +++++++ .../Volo/CmsKit/Tags/ITagRepository.cs | 14 +++++++ .../Volo/CmsKit/Tags/Tag.cs | 31 +++++++++++++++ .../EntityTags/EfCoreEntityTagRepository.cs | 14 +++++++ .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 14 +++++++ .../EntityTags/MongoEntityTagRepository.cs | 14 +++++++ .../CmsKit/MongoDB/Tags/MongoTagRepository.cs | 15 +++++++ 11 files changed, 214 insertions(+) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTag.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTagManager.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagManager.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityTags/EfCoreEntityTagRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/EntityTags/MongoEntityTagRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs new file mode 100644 index 0000000000..96b6b3f8e1 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs @@ -0,0 +1,9 @@ +namespace Volo.CmsKit.Tags +{ + public static class TagConsts + { + public static int MaxNameLength { get; set; } = 32; + + public static int MaxColorHexLength { get; set; } = 6; + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTag.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTag.cs new file mode 100644 index 0000000000..62bbd2877d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTag.cs @@ -0,0 +1,35 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.CmsKit.Tags +{ + public class EntityTag : AggregateRoot + { + protected EntityTag() + { + } + + public EntityTag(string entityType, string entityId, Guid tagId) + { + EntityType = entityType; + EntityId = entityId; + TagId = tagId; + } + + public virtual string EntityType { get; protected set; } + + public virtual string EntityId { get; protected set; } + + public virtual Guid TagId { get; set; } + + public override object[] GetKeys() + { + return new object[] + { + EntityType, + EntityId, + TagId + }; + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTagManager.cs new file mode 100644 index 0000000000..42f2b9e6d7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTagManager.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.EntityTags; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.EntityTags +{ + public class EntityTagManager : IEntityTagManager + { + private readonly ITagRepository tagRepository; + private readonly IEntityTagRepository entityTagRepository; + + public EntityTagManager( + ITagRepository tagRepository, + IEntityTagRepository entityTagRepository) + { + this.tagRepository = tagRepository; + this.entityTagRepository = entityTagRepository; + } + + public Task AddTagToEntityAsync(Guid tagId, string entityType, string entityId) + { + throw new NotImplementedException(); + } + + public Task> GetEntityTagsAsync(string entityType, string entityId) + { + throw new NotImplementedException(); + } + + public Task RemoveTagFromEntityAsync(Guid tagId, string entityType, string entityId) + { + throw new NotImplementedException(); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagManager.cs new file mode 100644 index 0000000000..296136fb2d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagManager.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.EntityTags +{ + public interface IEntityTagManager + { + Task AddTagToEntityAsync(Guid tagId, string entityType, string entityId); + Task RemoveTagFromEntityAsync(Guid tagId, string entityType, string entityId); + Task> GetEntityTagsAsync(string entityType, string entityId); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagRepository.cs new file mode 100644 index 0000000000..127b417bc9 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagRepository.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.EntityTags +{ + public interface IEntityTagRepository : IBasicRepository + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs new file mode 100644 index 0000000000..9874fc6e71 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Tags +{ + public interface ITagRepository : IBasicRepository + { + } +} 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 new file mode 100644 index 0000000000..3ebe06aa58 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs @@ -0,0 +1,31 @@ +using JetBrains.Annotations; +using System; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Volo.CmsKit.Tags +{ + public class Tag : BasicAggregateRoot, IMultiTenant, IHasCreationTime + { + protected Tag() + { + } + + public Tag( + [NotNull] string name, + [CanBeNull] string colorHex, + [NotNull] Guid? tenantId = null) + { + Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); + ColorHex = Check.Length(colorHex, nameof(colorHex), TagConsts.MaxColorHexLength); + TenantId = tenantId; + } + + public virtual string Name { get; set; } + public virtual string ColorHex { get; set; } + public Guid? TenantId { get; } + public DateTime CreationTime { get; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityTags/EfCoreEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityTags/EfCoreEntityTagRepository.cs new file mode 100644 index 0000000000..31663f8d31 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityTags/EfCoreEntityTagRepository.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.EntityTags +{ + public class EfCoreEntityTagRepository : EfCoreRepository, IEntityTagRepository + { + public EfCoreEntityTagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} 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 new file mode 100644 index 0000000000..0021281fa5 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Tags +{ + public class EfCoreTagRepository : EfCoreRepository, ITagRepository + { + public EfCoreTagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/EntityTags/MongoEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/EntityTags/MongoEntityTagRepository.cs new file mode 100644 index 0000000000..23723a86df --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/EntityTags/MongoEntityTagRepository.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.EntityTags; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.MongoDB.EntityTags +{ + public class MongoEntityTagRepository : MongoDbRepository, IEntityTagRepository + { + public MongoEntityTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} 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 new file mode 100644 index 0000000000..6eaa507ee4 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.MongoDB; +using Volo.CmsKit.Tags; + +namespace CmsKit.MongoDB.Tags +{ + public class MongoTagRepository : MongoDbRepository, ITagRepository + { + public MongoTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} From a4fab14dd636c262fa6b9bb066fbe721cea2ff1f Mon Sep 17 00:00:00 2001 From: Ahmet Date: Wed, 23 Dec 2020 13:35:21 +0300 Subject: [PATCH 06/54] refactoring tag and adding mongodb configurations for content --- .../Volo/CmsKit/Contents/Content.cs | 17 ++++++++++++----- .../Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs | 18 +++++++++--------- .../CmsKit/MongoDB/CmsKitMongoDbContext.cs | 3 +++ .../MongoDB/CmsKitMongoDbContextExtensions.cs | 6 ++++++ .../Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs | 3 +++ .../CmsKit/MongoDB/ICmsKitMongoDbContext.cs | 3 +++ 6 files changed, 36 insertions(+), 14 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 34546f6111..229ad037b0 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 @@ -2,26 +2,33 @@ using JetBrains.Annotations; using Volo.Abp; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; namespace Volo.CmsKit.Contents { - public class Content : FullAuditedAggregateRoot + public class Content : FullAuditedAggregateRoot, IMultiTenant { - public string EntityType { get; set; } + public virtual Guid? TenantId { get; } - public string EntityId { get; set; } + public virtual string EntityType { get; set; } - public string Value { get; set; } + public virtual string EntityId { get; set; } + + public virtual string Value { get; set; } protected Content() { } - public Content(Guid id, [NotNull] string entityType, [NotNull] string entityId, [NotNull] string value) : base(id) + + 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); Value = Check.NotNullOrWhiteSpace(value, nameof(value), ContentConsts.MaxValueLength); + + TenantId = tenantId; } + } } 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 3ebe06aa58..5f6ac203c0 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 @@ -9,23 +9,23 @@ namespace Volo.CmsKit.Tags { public class Tag : BasicAggregateRoot, IMultiTenant, IHasCreationTime { + public string Name { get; set; } + + public string ColorHex { get; set; } + + public Guid? TenantId { get; } + + public DateTime CreationTime { get; } + protected Tag() { } - public Tag( - [NotNull] string name, - [CanBeNull] string colorHex, - [NotNull] Guid? tenantId = null) + public Tag([NotNull] string name, [CanBeNull] string colorHex, Guid? tenantId = null) { Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); ColorHex = Check.Length(colorHex, nameof(colorHex), TagConsts.MaxColorHexLength); TenantId = tenantId; } - - public virtual string Name { get; set; } - public virtual string ColorHex { get; set; } - public Guid? TenantId { get; } - public DateTime CreationTime { get; } } } 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 09053167f9..dfd6a4e9a7 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 @@ -2,6 +2,7 @@ using Volo.Abp.Data; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Users; @@ -19,6 +20,8 @@ namespace Volo.CmsKit.MongoDB public IMongoCollection Ratings => Collection(); + public IMongoCollection Contents => Collection(); + protected override void CreateModel(IMongoModelBuilder modelBuilder) { base.CreateModel(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 2dc4c55a71..c996dd9017 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 @@ -2,6 +2,7 @@ using Volo.Abp; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Users; @@ -41,6 +42,11 @@ namespace Volo.CmsKit.MongoDB { x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Ratings"; }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Contents"; + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs index d479821b38..d6b7ce62e1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs @@ -3,7 +3,9 @@ using Volo.Abp.Modularity; using Volo.Abp.MongoDB; using Volo.Abp.Users.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; using Volo.CmsKit.MongoDB.Comments; +using Volo.CmsKit.MongoDB.Contents; using Volo.CmsKit.MongoDB.Ratings; using Volo.CmsKit.MongoDB.Reactions; using Volo.CmsKit.MongoDB.Users; @@ -28,6 +30,7 @@ namespace Volo.CmsKit.MongoDB options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); }); } } 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 40914a9720..d86c4ababf 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 @@ -2,6 +2,7 @@ using Volo.Abp.Data; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Users; @@ -18,5 +19,7 @@ namespace Volo.CmsKit.MongoDB IMongoCollection CmsUsers { get; } IMongoCollection Ratings { get; } + + IMongoCollection Contents { get; } } } From c7ccf32a79cd1cdfe3390b63d762f05a81b5a70d Mon Sep 17 00:00:00 2001 From: Ahmet Date: Wed, 23 Dec 2020 14:39:48 +0300 Subject: [PATCH 07/54] added content ef core configurations --- .../CmsKitDbContextModelCreatingExtensions.cs | 14 ++++++++++++++ .../CmsKitEntityFrameworkCoreModule.cs | 2 ++ 2 files changed, 16 insertions(+) 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 b81704034a..ed3f8df710 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 @@ -8,6 +8,7 @@ using Volo.CmsKit.Comments; using Volo.CmsKit.Reactions; using Volo.CmsKit.Users; using Volo.Abp.Users.EntityFrameworkCore; +using Volo.CmsKit.Contents; using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.Ratings; @@ -93,6 +94,19 @@ namespace Volo.CmsKit.EntityFrameworkCore r.HasIndex(x => new {x.TenantId, x.EntityType, x.EntityId, x.CreatorId}); }); } + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "Contents", options.Schema); + + b.ConfigureByConvention(); + + b.Property(x => x.EntityType).IsRequired().HasMaxLength(ContentConsts.MaxEntityTypeLength); + b.Property(x => x.EntityId).IsRequired().HasMaxLength(ContentConsts.MaxEntityIdLength); + b.Property(x => x.Value).IsRequired().HasMaxLength(ContentConsts.MaxValueLength); + + b.HasIndex(x => new { x.TenantId, x.EntityType, x.EntityId }); + }); } } } 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 33e57cab37..52ec478882 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 @@ -3,6 +3,7 @@ using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Modularity; using Volo.Abp.Users.EntityFrameworkCore; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Users; @@ -24,6 +25,7 @@ namespace Volo.CmsKit.EntityFrameworkCore options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); }); } } From 322577ef6fc4dfe29f01db138daf04b9983d196f Mon Sep 17 00:00:00 2001 From: Ahmet Date: Wed, 23 Dec 2020 14:49:29 +0300 Subject: [PATCH 08/54] added tag and entity tag with repositories --- .../Volo/CmsKit/Tags/TagConsts.cs | 6 ++- .../Volo/CmsKit/EntityTags/EntityTag.cs | 35 ----------------- .../CmsKit/EntityTags/EntityTagManager.cs | 39 ------------------- .../CmsKit/EntityTags/IEntityTagManager.cs | 15 ------- .../CmsKit/EntityTags/IEntityTagRepository.cs | 14 ------- .../Volo/CmsKit/Tags/EntityTag.cs | 32 +++++++++++++++ .../Volo/CmsKit/Tags/IEntityTagRepository.cs | 9 +++++ .../Volo/CmsKit/Tags/ITagRepository.cs | 5 --- .../Volo/CmsKit/Tags/Tag.cs | 12 +++--- .../CmsKitDbContextModelCreatingExtensions.cs | 26 +++++++++++++ .../CmsKitEntityFrameworkCoreModule.cs | 3 ++ .../EfCoreEntityTagRepository.cs | 7 ++-- .../CmsKit/MongoDB/CmsKitMongoDbContext.cs | 6 +++ .../MongoDB/CmsKitMongoDbContextExtensions.cs | 11 ++++++ .../CmsKit/MongoDB/CmsKitMongoDbModule.cs | 4 ++ .../CmsKit/MongoDB/ICmsKitMongoDbContext.cs | 6 +++ .../MongoEntityTagRepository.cs | 7 ++-- .../CmsKit/MongoDB/Tags/MongoTagRepository.cs | 3 +- 18 files changed, 115 insertions(+), 125 deletions(-) delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTag.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTagManager.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagManager.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/IEntityTagRepository.cs rename modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/{EntityTags => Tags}/EfCoreEntityTagRepository.cs (62%) rename modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/{EntityTags => Tags}/MongoEntityTagRepository.cs (57%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs index 96b6b3f8e1..5affee9c15 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs @@ -1,7 +1,11 @@ -namespace Volo.CmsKit.Tags +using Volo.CmsKit.Entities; + +namespace Volo.CmsKit.Tags { public static class TagConsts { + public static int MaxEntityTypeLength { get; set; } = CmsEntityConsts.MaxEntityTypeLength; + public static int MaxNameLength { get; set; } = 32; public static int MaxColorHexLength { get; set; } = 6; diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTag.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTag.cs deleted file mode 100644 index 62bbd2877d..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTag.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using Volo.Abp.Domain.Entities; - -namespace Volo.CmsKit.Tags -{ - public class EntityTag : AggregateRoot - { - protected EntityTag() - { - } - - public EntityTag(string entityType, string entityId, Guid tagId) - { - EntityType = entityType; - EntityId = entityId; - TagId = tagId; - } - - public virtual string EntityType { get; protected set; } - - public virtual string EntityId { get; protected set; } - - public virtual Guid TagId { get; set; } - - public override object[] GetKeys() - { - return new object[] - { - EntityType, - EntityId, - TagId - }; - } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTagManager.cs deleted file mode 100644 index 42f2b9e6d7..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/EntityTagManager.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.CmsKit.EntityTags; -using Volo.CmsKit.Tags; - -namespace Volo.CmsKit.EntityTags -{ - public class EntityTagManager : IEntityTagManager - { - private readonly ITagRepository tagRepository; - private readonly IEntityTagRepository entityTagRepository; - - public EntityTagManager( - ITagRepository tagRepository, - IEntityTagRepository entityTagRepository) - { - this.tagRepository = tagRepository; - this.entityTagRepository = entityTagRepository; - } - - public Task AddTagToEntityAsync(Guid tagId, string entityType, string entityId) - { - throw new NotImplementedException(); - } - - public Task> GetEntityTagsAsync(string entityType, string entityId) - { - throw new NotImplementedException(); - } - - public Task RemoveTagFromEntityAsync(Guid tagId, string entityType, string entityId) - { - throw new NotImplementedException(); - } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagManager.cs deleted file mode 100644 index 296136fb2d..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagManager.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading.Tasks; -using Volo.CmsKit.Tags; - -namespace Volo.CmsKit.EntityTags -{ - public interface IEntityTagManager - { - Task AddTagToEntityAsync(Guid tagId, string entityType, string entityId); - Task RemoveTagFromEntityAsync(Guid tagId, string entityType, string entityId); - Task> GetEntityTagsAsync(string entityType, string entityId); - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagRepository.cs deleted file mode 100644 index 127b417bc9..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/EntityTags/IEntityTagRepository.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.Domain.Repositories; -using Volo.CmsKit.Tags; - -namespace Volo.CmsKit.EntityTags -{ - public interface IEntityTagRepository : IBasicRepository - { - } -} 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 new file mode 100644 index 0000000000..5825f32936 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs @@ -0,0 +1,32 @@ +using System; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Volo.CmsKit.Tags +{ + public class EntityTag : Entity, IMultiTenant + { + public virtual Guid TagId { get; set; } + + public virtual Guid EntityId { get; set; } + + public virtual Guid? TenantId { get; } + + protected EntityTag() + { + } + + public EntityTag(Guid tagId, Guid entityId, Guid? tenantId = null) + { + TagId = tagId; + EntityId = entityId; + TenantId = tenantId; + } + + public override object[] GetKeys() + { + return new object[] { TagId, EntityId, TenantId }; + } + + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/IEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/IEntityTagRepository.cs new file mode 100644 index 0000000000..6ec0fd4b44 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/IEntityTagRepository.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Domain.Repositories; + +namespace Volo.CmsKit.Tags +{ + public interface IEntityTagRepository : IBasicRepository + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs index 9874fc6e71..2a619887c1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs @@ -1,10 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; -using Volo.CmsKit.Tags; namespace Volo.CmsKit.Tags { 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 5f6ac203c0..80e267264c 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 @@ -1,28 +1,28 @@ using JetBrains.Annotations; using System; using Volo.Abp; -using Volo.Abp.Auditing; -using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; namespace Volo.CmsKit.Tags { - public class Tag : BasicAggregateRoot, IMultiTenant, IHasCreationTime + public class Tag : FullAuditedAggregateRoot, IMultiTenant { + public string EntityType { get; set; } + public string Name { get; set; } public string ColorHex { get; set; } public Guid? TenantId { get; } - public DateTime CreationTime { get; } - protected Tag() { } - public Tag([NotNull] string name, [CanBeNull] string colorHex, Guid? tenantId = null) + public Tag([NotNull] string entityType, [NotNull] string name, [CanBeNull] string colorHex, Guid? tenantId = null) { + EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); ColorHex = Check.Length(colorHex, nameof(colorHex), TagConsts.MaxColorHexLength); TenantId = tenantId; 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 ed3f8df710..fe67914dc9 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 @@ -11,6 +11,7 @@ using Volo.Abp.Users.EntityFrameworkCore; using Volo.CmsKit.Contents; using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.Ratings; +using Volo.CmsKit.Tags; namespace Volo.CmsKit.EntityFrameworkCore { @@ -107,6 +108,31 @@ namespace Volo.CmsKit.EntityFrameworkCore b.HasIndex(x => new { x.TenantId, x.EntityType, x.EntityId }); }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "Tags", options.Schema); + + b.ConfigureByConvention(); + + b.Property(x => x.EntityType).IsRequired().HasMaxLength(TagConsts.MaxEntityTypeLength); + b.Property(x => x.Name).IsRequired().HasMaxLength(TagConsts.MaxNameLength); + b.Property(x => x.ColorHex).IsRequired().HasMaxLength(TagConsts.MaxColorHexLength); + + b.HasIndex(x => new { x.TenantId, x.Name }); + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "EntityTags", options.Schema); + + b.ConfigureByConvention(); + + b.Property(x => x.EntityId).IsRequired(); + b.Property(x => x.TagId).IsRequired(); + + b.HasIndex(x => new { x.TenantId, x.EntityId, x.TagId }); + }); } } } 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 52ec478882..7e2057c6f0 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 @@ -6,6 +6,7 @@ using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; namespace Volo.CmsKit.EntityFrameworkCore @@ -26,6 +27,8 @@ namespace Volo.CmsKit.EntityFrameworkCore options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); + options.AddRepository(); }); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityTags/EfCoreEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs similarity index 62% rename from modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityTags/EfCoreEntityTagRepository.cs rename to modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs index 31663f8d31..cca61b802b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityTags/EfCoreEntityTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs @@ -1,14 +1,13 @@ using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; -using Volo.CmsKit.Tags; -namespace Volo.CmsKit.EntityTags +namespace Volo.CmsKit.Tags { - public class EfCoreEntityTagRepository : EfCoreRepository, IEntityTagRepository + public class EfCoreEntityTagRepository: EfCoreRepository, IEntityTagRepository { public EfCoreEntityTagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } } -} +} \ No newline at end of file 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 dfd6a4e9a7..965cf917ec 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 @@ -5,7 +5,9 @@ using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; +using Tag = MongoDB.Driver.Tag; namespace Volo.CmsKit.MongoDB { @@ -21,6 +23,10 @@ namespace Volo.CmsKit.MongoDB public IMongoCollection Ratings => Collection(); public IMongoCollection Contents => Collection(); + + public IMongoCollection Tags => Collection(); + + public IMongoCollection EntityTags => 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 c996dd9017..f208e5644c 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 @@ -5,6 +5,7 @@ using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; namespace Volo.CmsKit.MongoDB @@ -47,6 +48,16 @@ namespace Volo.CmsKit.MongoDB { x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Contents"; }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Tags"; + }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "EntityTags"; + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs index d6b7ce62e1..d86e727a09 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs @@ -8,9 +8,11 @@ using Volo.CmsKit.MongoDB.Comments; using Volo.CmsKit.MongoDB.Contents; using Volo.CmsKit.MongoDB.Ratings; using Volo.CmsKit.MongoDB.Reactions; +using Volo.CmsKit.MongoDB.Tags; using Volo.CmsKit.MongoDB.Users; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; namespace Volo.CmsKit.MongoDB @@ -31,6 +33,8 @@ namespace Volo.CmsKit.MongoDB options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); + options.AddRepository(); }); } } 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 d86c4ababf..5d16305567 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 @@ -5,7 +5,9 @@ using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; +using Tag = MongoDB.Driver.Tag; namespace Volo.CmsKit.MongoDB { @@ -21,5 +23,9 @@ namespace Volo.CmsKit.MongoDB IMongoCollection Ratings { get; } IMongoCollection Contents { get; } + + IMongoCollection Tags { get; } + + IMongoCollection EntityTags { get; } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/EntityTags/MongoEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs similarity index 57% rename from modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/EntityTags/MongoEntityTagRepository.cs rename to modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs index 23723a86df..5ac1a4b69c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/EntityTags/MongoEntityTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs @@ -1,14 +1,13 @@ using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; -using Volo.CmsKit.EntityTags; using Volo.CmsKit.Tags; -namespace Volo.CmsKit.MongoDB.EntityTags +namespace Volo.CmsKit.MongoDB.Tags { - public class MongoEntityTagRepository : MongoDbRepository, IEntityTagRepository + public class MongoEntityTagRepository: MongoDbRepository, IEntityTagRepository { public MongoEntityTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) { } } -} +} \ 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 6eaa507ee4..64118c78c9 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 @@ -1,10 +1,9 @@ using System; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; -using Volo.CmsKit.MongoDB; using Volo.CmsKit.Tags; -namespace CmsKit.MongoDB.Tags +namespace Volo.CmsKit.MongoDB.Tags { public class MongoTagRepository : MongoDbRepository, ITagRepository { From 15c48109028fb8536f41e82b6cc91f345ae44410 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 23 Dec 2020 15:57:42 +0300 Subject: [PATCH 09/54] Add domain & repositories of Tags --- .../Volo/CmsKit/Contents/Content.cs | 1 - .../Volo/CmsKit/Tags/ITagManager.cs | 32 ++++++++ .../Volo/CmsKit/Tags/ITagRepository.cs | 22 ++++- .../Volo/CmsKit/Tags/Tag.cs | 32 +++++--- .../Volo/CmsKit/Tags/TagManager.cs | 80 +++++++++++++++++++ .../CmsKitDbContextModelCreatingExtensions.cs | 2 +- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 46 ++++++++++- .../CmsKit/MongoDB/Tags/MongoTagRepository.cs | 46 ++++++++++- 8 files changed, 247 insertions(+), 14 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs 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 229ad037b0..2c3cd28593 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 @@ -29,6 +29,5 @@ namespace Volo.CmsKit.Contents TenantId = tenantId; } - } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs new file mode 100644 index 0000000000..25fccfb474 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs @@ -0,0 +1,32 @@ +using JetBrains.Annotations; +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Domain.Volo.CmsKit.Tags +{ + public interface ITagManager : IDomainService + { + Task InsertAsync( + [NotNull] string entityType, + [NotNull] string name, + [CanBeNull] string hexColor, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + + Task UpdateAsync( + Guid id, + [NotNull] string name, + [CanBeNull] string hexColor, + CancellationToken cancellationToken = default); + + Task GetOrAddAsync( + [NotNull] string entityType, + [NotNull] string name, + [CanBeNull] string hexColor = null, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs index 2a619887c1..8cfeee9551 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs @@ -1,9 +1,29 @@ -using System; +using JetBrains.Annotations; +using System; +using System.Threading; +using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; namespace Volo.CmsKit.Tags { public interface ITagRepository : IBasicRepository { + Task GetAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId, + CancellationToken cancellationToken = default); + + Task AnyAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + + Task FindAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId, + CancellationToken cancellationToken = default); } } 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 80e267264c..a13ea70ba0 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 @@ -9,23 +9,37 @@ namespace Volo.CmsKit.Tags public class Tag : FullAuditedAggregateRoot, IMultiTenant { public string EntityType { get; set; } - - public string Name { get; set; } - - public string ColorHex { get; set; } - + + public string Name { get; protected set; } + + public string HexColor { get; protected set; } + public Guid? TenantId { get; } - + protected Tag() { } - public Tag([NotNull] string entityType, [NotNull] string name, [CanBeNull] string colorHex, Guid? tenantId = null) + public Tag( + [NotNull] string entityType, + [NotNull] string name, + [CanBeNull] string hexColor, + Guid? tenantId = null) { EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); - Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); - ColorHex = Check.Length(colorHex, nameof(colorHex), TagConsts.MaxColorHexLength); + SetName(name); + SetHexColor(hexColor); TenantId = tenantId; } + + public void SetName(string name) + { + Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); + } + + public void SetHexColor(string hexColor) + { + HexColor = Check.Length(hexColor, nameof(hexColor), TagConsts.MaxColorHexLength); + } } } 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 new file mode 100644 index 0000000000..0abdbeb969 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs @@ -0,0 +1,80 @@ +using JetBrains.Annotations; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Domain.Services; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Domain.Volo.CmsKit.Tags +{ + public class TagManager : DomainService, ITagManager + { + private readonly ITagRepository _tagRepository; + + public TagManager(ITagRepository tagRepository) + { + _tagRepository = tagRepository; + } + + public async Task GetOrAddAsync( + [NotNull] string entityType, + [NotNull] string name, + [CanBeNull] string hexColor = null, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + var entity = await _tagRepository.FindAsync(entityType, name, tenantId, cancellationToken); + + if (entity == null) + { + entity = await InsertAsync(entityType, name, hexColor, tenantId, cancellationToken); + } + + return entity; + } + + public async Task InsertAsync( + [NotNull] string entityType, + [NotNull] string name, + [CanBeNull] string hexColor, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + if (await _tagRepository.AnyAsync(entityType, name, tenantId, cancellationToken)) + { + throw new BusinessException(message: "Tag already exist!"); // Already Exist + } + + return await _tagRepository.InsertAsync( + new Tag( + entityType, + name, + hexColor, + tenantId), + cancellationToken: cancellationToken); + } + + public async Task UpdateAsync( + Guid id, + [NotNull] string name, + [CanBeNull] string hexColor, + CancellationToken cancellationToken = default) + { + var entity = await _tagRepository.GetAsync(id, cancellationToken: cancellationToken); + + entity.SetName(name); + entity.SetHexColor(hexColor); + + if (await _tagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken)) + { + throw new BusinessException(message: "Tag already exist!"); // Already Exist + } + + return await _tagRepository.UpdateAsync(entity); + } + } +} 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 fe67914dc9..c9c6bbca44 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 @@ -117,7 +117,7 @@ namespace Volo.CmsKit.EntityFrameworkCore b.Property(x => x.EntityType).IsRequired().HasMaxLength(TagConsts.MaxEntityTypeLength); b.Property(x => x.Name).IsRequired().HasMaxLength(TagConsts.MaxNameLength); - b.Property(x => x.ColorHex).IsRequired().HasMaxLength(TagConsts.MaxColorHexLength); + b.Property(x => x.HexColor).IsRequired().HasMaxLength(TagConsts.MaxColorHexLength); b.HasIndex(x => new { x.TenantId, x.Name }); }); 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 0021281fa5..8a530ba705 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 @@ -1,4 +1,9 @@ -using System; +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore; +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -10,5 +15,44 @@ namespace Volo.CmsKit.Tags public EfCoreTagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } + + public Task AnyAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId, + CancellationToken cancellationToken = default) + { + return DbSet.AnyAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken); + } + + public Task GetAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId, + CancellationToken cancellationToken = default) + { + return GetAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken: cancellationToken); + } + + public Task FindAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId, + CancellationToken cancellationToken = default) + { + return FindAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken: cancellationToken); + } } } 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 64118c78c9..9d4644e47b 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 @@ -1,4 +1,8 @@ -using System; +using JetBrains.Annotations; +using MongoDB.Driver.Linq; +using System; +using System.Threading; +using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Tags; @@ -10,5 +14,45 @@ namespace Volo.CmsKit.MongoDB.Tags public MongoTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) { } + + public Task AnyAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId, + CancellationToken cancellationToken = default) + { + return GetMongoQueryable() + .AnyAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken); + } + + public Task GetAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId, + CancellationToken cancellationToken = default) + { + return GetAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken: cancellationToken); + } + + public Task FindAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId, + CancellationToken cancellationToken = default) + { + return FindAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken: cancellationToken); + } } } From 1f586bc9694d460981b5d24a3618a586dfa62fc2 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 23 Dec 2020 17:59:44 +0300 Subject: [PATCH 10/54] Fix namespaces for CmsKit Tags --- .../src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs | 2 +- .../src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs index 25fccfb474..b1562a341d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Volo.Abp.Domain.Services; using Volo.CmsKit.Tags; -namespace Volo.CmsKit.Domain.Volo.CmsKit.Tags +namespace Volo.CmsKit.Tags { public interface ITagManager : IDomainService { 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 0abdbeb969..c62317cd64 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,15 +1,11 @@ using JetBrains.Annotations; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Domain.Services; -using Volo.CmsKit.Tags; -namespace Volo.CmsKit.Domain.Volo.CmsKit.Tags +namespace Volo.CmsKit.Tags { public class TagManager : DomainService, ITagManager { From a407b312e25e73af7d5d8177bd5fa97ec6bd3422 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 23 Dec 2020 18:18:27 +0300 Subject: [PATCH 11/54] Add missing key to EntityTag for CmsKit --- .../CmsKitDbContextModelCreatingExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) 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 c9c6bbca44..f7cdb5b59e 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 @@ -127,6 +127,8 @@ namespace Volo.CmsKit.EntityFrameworkCore b.ToTable(options.TablePrefix + "EntityTags", options.Schema); b.ConfigureByConvention(); + + b.HasKey(x => new { x.TenantId, x.EntityId, x.TagId }); b.Property(x => x.EntityId).IsRequired(); b.Property(x => x.TagId).IsRequired(); From 5d8cea1bfb69b76add0cf6d5e6ad377b8ab910f8 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 11:36:43 +0300 Subject: [PATCH 12/54] Add @abp/cms-kit package --- modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json index edc0ad64ba..cc22f5d84d 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json @@ -3,6 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^4.1.0-rc.1" + "@abp/aspnetcore.mvc.ui.theme.basic": "^4.1.0-rc.2", + "@abp/cms-kit": "4.1.0-rc.2" } } \ No newline at end of file From 972ff0749dc696542256a71007e2884509dc3f60 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 11:37:04 +0300 Subject: [PATCH 13/54] Update yarn --- .../host/Volo.CmsKit.Web.Unified/yarn.lock | 258 ++++++++++-------- 1 file changed, 139 insertions(+), 119 deletions(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock index a49fcf1e06..c59ef6d24e 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-4.1.0-rc.1.tgz#77f1021486a26b6aa88052bd1c45db7d978d44c2" - integrity sha512-xQJGWtWDCykDhe68DEvZPo5fGKvYt8dxaU6AlqC/wga2kfsGWGafKxnndPFfkO0wsdPl85nakAyPITaRFXjO8g== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~4.1.0-rc.1" - -"@abp/aspnetcore.mvc.ui.theme.shared@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-4.1.0-rc.1.tgz#a316483d40274ecb3acb6d050e0328ea7c95eeca" - integrity sha512-L+e+MEwZ/rgB8htWpDEo+dyE7/wJ0Z1geJrl194/Zxz85aequyOZTX0tJ6eyrryK0BSBnk2/1v/7IkZC+qralw== - dependencies: - "@abp/aspnetcore.mvc.ui" "~4.1.0-rc.1" - "@abp/bootstrap" "~4.1.0-rc.1" - "@abp/bootstrap-datepicker" "~4.1.0-rc.1" - "@abp/datatables.net-bs4" "~4.1.0-rc.1" - "@abp/font-awesome" "~4.1.0-rc.1" - "@abp/jquery-form" "~4.1.0-rc.1" - "@abp/jquery-validation-unobtrusive" "~4.1.0-rc.1" - "@abp/lodash" "~4.1.0-rc.1" - "@abp/luxon" "~4.1.0-rc.1" - "@abp/malihu-custom-scrollbar-plugin" "~4.1.0-rc.1" - "@abp/select2" "~4.1.0-rc.1" - "@abp/sweetalert" "~4.1.0-rc.1" - "@abp/timeago" "~4.1.0-rc.1" - "@abp/toastr" "~4.1.0-rc.1" - -"@abp/aspnetcore.mvc.ui@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-4.1.0-rc.1.tgz#30294bd2ff5284dcc044b6d92b589b3931c06c31" - integrity sha512-X9teoUD6zwfQ7oo723Rvojg1melY2yUPiVrpeaQN/LJSy/x41TLQwFacx6LsLG19F9CyG0+QA7bqziDCQlI7KA== +"@abp/aspnetcore.mvc.ui.theme.basic@^4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-4.1.0-rc.2.tgz#b9462cbe36c41d68e2f44b79a3a2dba2c1b2b54a" + integrity sha512-KW3J6HnN1zZrCmrWmEcXBnGIOeuJDdp1jUECAm4Bdxi++VzfIbGlVvpcvUdT1E213reOUWi4dPhcej12DwrmDw== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~4.1.0-rc.2" + +"@abp/aspnetcore.mvc.ui.theme.shared@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-4.1.0-rc.2.tgz#d64cea1e504bcd3a08a1819025d40f3f84f0aadc" + integrity sha512-A/DRLwtJO7YCdqAgSF84wNRKjvGEQvcBocIwRxXCJEe3drxMoSwkAGjXQlxIYWZKdYbYUWDTjil2Mvwf91GUqg== + dependencies: + "@abp/aspnetcore.mvc.ui" "~4.1.0-rc.2" + "@abp/bootstrap" "~4.1.0-rc.2" + "@abp/bootstrap-datepicker" "~4.1.0-rc.2" + "@abp/datatables.net-bs4" "~4.1.0-rc.2" + "@abp/font-awesome" "~4.1.0-rc.2" + "@abp/jquery-form" "~4.1.0-rc.2" + "@abp/jquery-validation-unobtrusive" "~4.1.0-rc.2" + "@abp/lodash" "~4.1.0-rc.2" + "@abp/luxon" "~4.1.0-rc.2" + "@abp/malihu-custom-scrollbar-plugin" "~4.1.0-rc.2" + "@abp/select2" "~4.1.0-rc.2" + "@abp/sweetalert" "~4.1.0-rc.2" + "@abp/timeago" "~4.1.0-rc.2" + "@abp/toastr" "~4.1.0-rc.2" + +"@abp/aspnetcore.mvc.ui@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-4.1.0-rc.2.tgz#54bf30def590e6d25fc35f77253888f3d9f74b9c" + integrity sha512-eOh5IBn4eNAjj2i6tlLRIV/r61Ef7+Z3PNvGgdml/XCo50el4G9XE7shxuGOY+MaFMfmsST2tcJlO9iAo9n2Yw== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -43,145 +43,160 @@ micromatch "^4.0.2" path "^0.12.7" -"@abp/bootstrap-datepicker@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-4.1.0-rc.1.tgz#fa9bd12f966b6aded9ec798088513a98d1a6f717" - integrity sha512-swXBBvvw4eHgfsbMs6tfbtq+N88f9VoTvgoQE9VqbglZrTfFwHFxq8zuqmG7nQoUd+HfoXnnNBrOn4U6hYpkxA== +"@abp/bootstrap-datepicker@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-4.1.0-rc.2.tgz#d3fe863222a11771d366b1a3c246aaf34df94081" + integrity sha512-vn2xWAK3xqo5fMZJ9dOAZZmL+ZUnzZZNh3lF6uA97wTN/SbePlmHBYJpsCKIxOwbJS2HCvekHGJN/Ps4oEjlbw== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-4.1.0-rc.1.tgz#aad1713a1edd3eca51569ee64f3d9359a0147d75" - integrity sha512-LF2ma0E65f0GZqRDPQsP5eSTQDc75QUBkwOXnZNpDvvd+ZeUmpUnejc+Zghc0PaQeVZ2/eaqBlilthvdSlW25A== +"@abp/bootstrap@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-4.1.0-rc.2.tgz#b5132cf4c4c92fe833823cf2b91ab1b0167b0ecf" + integrity sha512-SsWEV0DveBIHiG051E6aBB371D15QIsGeo+POFhvQUvrlmzMBlFCAlmH0ef8w1n+3M3C37irCgEGKctt2pbcxQ== dependencies: - "@abp/core" "~4.1.0-rc.1" + "@abp/core" "~4.1.0-rc.2" bootstrap "^4.5.0" bootstrap-v4-rtl "4.4.1-2" -"@abp/core@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-4.1.0-rc.1.tgz#d607852ace424e8fb96b333f864cda356dd8eacb" - integrity sha512-MedPAclj6iZnZZRs9IAGkQUagrv3/XZJYWHlROKeGvGvsrCBMkKlDVriQ1GhxzS9TQ2FOwtjMEPL5DOw35ESDg== +"@abp/cms-kit@4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/cms-kit/-/cms-kit-4.1.0-rc.2.tgz#d2790dd3812214ab0c8eba6e9ad2b8019889e056" + integrity sha512-bS632Qp3tN+LHVj505lUgwtu2JVOhSf3W6VAXlYG0pSy8n1ltonDZHNKO6iwvnskdPaAA4wgJPWgqjXigChx0Q== dependencies: - "@abp/utils" "^4.1.0-rc.1" + "@abp/star-rating-svg" "~4.1.0-rc.2" -"@abp/datatables.net-bs4@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-4.1.0-rc.1.tgz#cf11cbf0941ba10ca628c806273a783769c58c7b" - integrity sha512-9sRONOte0lDoyGWBNYkAWKjGDl4IG0Ip4olqLrO4iyPyE22E9DY/6Nvl/X1SIRU4QCGSn13b14VP2JycTXFt+Q== +"@abp/core@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-4.1.0-rc.2.tgz#d306106a53fa56109751be0099785c94f43be56f" + integrity sha512-b0mOYSz8hNgZ/hBeYg8hkthJgE8CLyHNa2NcythPoIW8RR5qHmDtGoFnuFovLvLk7r+M4NWyxXRKEshSszIPyA== dependencies: - "@abp/datatables.net" "~4.1.0-rc.1" + "@abp/utils" "^4.1.0-rc.2" + +"@abp/datatables.net-bs4@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-4.1.0-rc.2.tgz#99aa1fbad91939fc23265324a3d8a45d0c1e5a7a" + integrity sha512-Y9UyqniOkx5DJO+2GGurnQE1yfRmGaQ3y7V07gKWRq+gHLUhE+vfgOLVpGM6ufdTIbLvVw5Ng+3gfOmPlUnpxg== + dependencies: + "@abp/datatables.net" "~4.1.0-rc.2" datatables.net-bs4 "^1.10.21" -"@abp/datatables.net@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-4.1.0-rc.1.tgz#882e8b00148ccd58f674253aa492b2d197bc0b58" - integrity sha512-HnWBL1i+/fEHh7JUapX20w7nWBBfr44JBvPQy6JSrOD82+BLpPBMDN02uLC8TUR5KJLHTrLecus10qaQ8FUsrA== +"@abp/datatables.net@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-4.1.0-rc.2.tgz#1a134688259d32187d822d8a49c7a68b4cc226c7" + integrity sha512-9o5g8s7ZTlThd1FMFmO7wS+MxmXgUMmiWx7Hwara9ypfJPd0vanz10bQAdTpLiDy/aa0tUmz0xOVj73yvBJm9Q== dependencies: - "@abp/jquery" "~4.1.0-rc.1" + "@abp/jquery" "~4.1.0-rc.2" datatables.net "^1.10.21" -"@abp/font-awesome@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-4.1.0-rc.1.tgz#e17b6b7a209247ce7d4bab6ba1c89060236c100d" - integrity sha512-lHSJaZBea+eIBS25WJmP+Ual5k96vDDEQP3jwaNbqBfZhm3PUcd+JYS2/LCTHyezvtyOt+CmNOSslK3/XlyzFQ== +"@abp/font-awesome@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-4.1.0-rc.2.tgz#ecf490861c09250cf61611ac74cec5ab4392e807" + integrity sha512-6yAsf/ee2hdrHHUACql8c3gY54Hd7YAK2olHymyc3Io2hhK2VxXRc2W2oRSwbQ9GsSE+XDrEVtjIR64nBseTeg== dependencies: - "@abp/core" "~4.1.0-rc.1" + "@abp/core" "~4.1.0-rc.2" "@fortawesome/fontawesome-free" "^5.13.0" -"@abp/jquery-form@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-4.1.0-rc.1.tgz#d179002c7187232a0c58c57f097c97f2762a0ea7" - integrity sha512-K4tVphzYiZkM/259j1JOqDihXh92ZBwuPZcjEznySxZkk7vuSEEWXb5Utr/+e1+hAgkLS/e9Apv5ZzIv9gyvkg== +"@abp/jquery-form@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-4.1.0-rc.2.tgz#76dff67a3fe6e6ad7bd60bb909de93c09966cc0a" + integrity sha512-LGafwxyRYUbHQlJ9pPbYdkVqzdT/y1Fp4Nr4C3W5jxsJuaSICl0RPkRHIPALeoqbpEWuj6dVep6ZuO9hhxBzNw== dependencies: - "@abp/jquery" "~4.1.0-rc.1" + "@abp/jquery" "~4.1.0-rc.2" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.1.0-rc.1.tgz#7192903f39bc75923cfc5d6c2200636347eea9a5" - integrity sha512-S4dInrXybcUcZYjHsanj1fwvf9jSTtOQZnoMVL8wdrWa0OA7zYkKmzmE9Kx3pGzqVbPpvkOLuQT35YgK5jyn5Q== +"@abp/jquery-validation-unobtrusive@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.1.0-rc.2.tgz#1f1d395cfa47740d47303ff512592ff1993f9e13" + integrity sha512-0LXWvgfyLHVw7qRVOmY0rfVlq+yJq/nhbcVoYK+QbmKnrFu+KZg0KNMOD8wTXs8mZ1EKGQpoQKWxImtCnGrV/A== dependencies: - "@abp/jquery-validation" "~4.1.0-rc.1" + "@abp/jquery-validation" "~4.1.0-rc.2" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-4.1.0-rc.1.tgz#43dcc20c5deb82c9b42409c55fc23aca457632b8" - integrity sha512-mHZTCIVkDwhKMJfGRk0k78dfChp3z1k4Sy0dNPAnbIIn9PQL819yh7ug47SkJtllnYQYkj9tAedXIVxG6EdYPA== +"@abp/jquery-validation@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-4.1.0-rc.2.tgz#ad4b464fd0133eab8d08c781c7d7c4e00bc4918d" + integrity sha512-iLTobfwqDk7iiQxvv5UowxOKywsh/77VlAVktstnFG3N3Y73+JYKzM0mGM/j4zM1OrjbF9/cnPnDVX7bATPz9w== dependencies: - "@abp/jquery" "~4.1.0-rc.1" + "@abp/jquery" "~4.1.0-rc.2" jquery-validation "^1.19.2" -"@abp/jquery@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-4.1.0-rc.1.tgz#012cd17d1cab3155a146be5b2d68ed0dd107eb11" - integrity sha512-yMRUsYEiNifbv8iEHKxoCu8F+uyB13Awm0UtU+TU+Z7+9AcS8L2RdRI47XWxSanKi7g9THEYSTE99acw9h3nNQ== +"@abp/jquery@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-4.1.0-rc.2.tgz#0f64cad5b1ae3e47d2344e5fb30c347b89d6d2bb" + integrity sha512-YubZwMJIN+UcfxfUlt3usfcLMG9WcXNpemUsdBtlKNzti562KZMIHPFLRL+DsiqvzZ74h2PxSWWsxS42Z7z0Yw== dependencies: - "@abp/core" "~4.1.0-rc.1" + "@abp/core" "~4.1.0-rc.2" jquery "~3.5.1" -"@abp/lodash@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-4.1.0-rc.1.tgz#10b54e2a698499bba11a00c690afe7a9a7b61d41" - integrity sha512-MQoWBvj0EMi23s7beBbhioO7mlFk0Xhdes7dgvJLFQRafjpkjZk2YRbHmhvT3BCimYI7SRD3xFTN28Z5I8MlUA== +"@abp/lodash@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-4.1.0-rc.2.tgz#9281c641ab7b7b33e7acf12815dc461e7ae967b9" + integrity sha512-RqdekrAyLPaLNJddmrq89EdrI1xg4296tOafFLHvirgRWisJTIa9bflTOwMwEg9FNdLJgA0zHi4WdAMer0qZdA== dependencies: - "@abp/core" "~4.1.0-rc.1" + "@abp/core" "~4.1.0-rc.2" lodash "^4.17.15" -"@abp/luxon@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-4.1.0-rc.1.tgz#d4db198d68ce79364665291d22540089957cfc84" - integrity sha512-VTWsmsBj7dTGBzoIG9HU2Z7PpwjWQFRGCwIekvDksaYBVE4tCYS0AMcKsracYha+oY/uOZL1o5ztWgnfHnAmHQ== +"@abp/luxon@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-4.1.0-rc.2.tgz#78fc1cf651d7c19b87a31823cd3ce68961d6b1e6" + integrity sha512-U4e9uGZlg9xj9tBNP337v3wiaSR6qxWsBgh/duQGWrqV+75LlQjYcZaPoXDidUUS6U6epDSR2pc2T39rahcgSQ== dependencies: - "@abp/core" "~4.1.0-rc.1" + "@abp/core" "~4.1.0-rc.2" luxon "^1.24.1" -"@abp/malihu-custom-scrollbar-plugin@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-4.1.0-rc.1.tgz#13b56b0edcf468845b765eb8e58f663bd4263919" - integrity sha512-7ZJdZz8Hw35XGgQF/i1fEzknZYTzmtITZXB+DuVUISBLH0DKisqIREdYiHeGTFhY5fQqbW8ImY65WacKAImlYw== +"@abp/malihu-custom-scrollbar-plugin@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-4.1.0-rc.2.tgz#36553e71052cad9734e0c9b2c65759e538468648" + integrity sha512-JQ6PCcj5qmF9MxNRPAsKHHnqBPCdn4lQnwxZrHcG9tD70Gx+NfC4UH41tqXI+htba4k0PHRyH2y39Q1iJm0NFA== dependencies: - "@abp/core" "~4.1.0-rc.1" + "@abp/core" "~4.1.0-rc.2" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-4.1.0-rc.1.tgz#316e6de20ea0d02000c176ff6522bccaf1fbaa59" - integrity sha512-UZIXmxke8y9PUBjk8mBDyEY2y8jmYhssFt5SVEWEfWOg9NG6fvkOa+JCZl9wS9jtyPAHCMfCJIeLqFpkxiL3Vw== +"@abp/select2@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-4.1.0-rc.2.tgz#c48e865f401ddce32dff2a7a14ae07c4bde2f57b" + integrity sha512-YYK/SIqXQcSDQFMVg/ogohc76d4JDrOVQEbzfkNNI5bKVJo+hkqtNzAwV9FLdPZZNw15QMv0eF1ie4aUtIxyaA== dependencies: - "@abp/core" "~4.1.0-rc.1" + "@abp/core" "~4.1.0-rc.2" select2 "^4.0.13" -"@abp/sweetalert@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-4.1.0-rc.1.tgz#13c72aa4d93017316908cbbb67f8587eadec79e2" - integrity sha512-0JNLgxAc/iFYdgtn84S6L1tL6mShbMMvFKLpip8fTsLX1PFAf1o4sNOjHCUZ6J1+2rrGgkBc/azMKBVep2ULQA== +"@abp/star-rating-svg@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/star-rating-svg/-/star-rating-svg-4.1.0-rc.2.tgz#558c681eb591847b3e8f114cbe610e4331f8a0a2" + integrity sha512-LNFCfytarGhqS+91lxYHQKMvlbHMDpjU0Knj8qyefNtQ+rbM2CEspWEtcducim+Qn4brqIHRudUvLI+eEC/0yQ== dependencies: - "@abp/core" "~4.1.0-rc.1" + "@abp/jquery" "~4.1.0-rc.2" + star-rating-svg "^3.5.0" + +"@abp/sweetalert@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-4.1.0-rc.2.tgz#cdcaf8e9a33cf218a687fd6a42cfe1c85d89c6b7" + integrity sha512-sjQd8TF9oUnaQ1OPTGdVyAfWqSZEk4bRbC/qw2CouEOfRLatzkC0JcmzFLN0f5N1am1RQwkFakpENKH7NqTCvg== + dependencies: + "@abp/core" "~4.1.0-rc.2" sweetalert "^2.1.2" -"@abp/timeago@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-4.1.0-rc.1.tgz#e72fcdbde3b79bbe2ad8565abb45ba09af527ce0" - integrity sha512-E2kobQoglVD+dNFmuSJgbqbjaON65lNaDeiABesvgDnm308YBDyEvIZ746yqBfJHnMqyBVX8VHOcnY49QJfXkA== +"@abp/timeago@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-4.1.0-rc.2.tgz#445d043ae482b76799b496ae6565abfaf75a34b9" + integrity sha512-wWx56EZMUGIfqJV5JLCvUp4RVhKXHYLQaVNQSF8E05COXmSQwFThVS7vbuiODFp2BGm6RAqCVtZDCreu2B8z9Q== dependencies: - "@abp/jquery" "~4.1.0-rc.1" + "@abp/jquery" "~4.1.0-rc.2" timeago "^1.6.7" -"@abp/toastr@~4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-4.1.0-rc.1.tgz#cff01b9a937e6e38679428724113cc62ea562743" - integrity sha512-HYiYukOA3HjSpFD9ZKMrfU/u/T/mzfpLhtFVz6bG3i5ciSgaOrYFm1pWVG1tA2yg3oelBymYJ9oW29GuPTk30Q== +"@abp/toastr@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-4.1.0-rc.2.tgz#1af16fa8687201b6b9c7229d087a4233998703b9" + integrity sha512-g+Jl5H1ZHoJ4JwWuix0xA+GMFY42pwq8WYjxP6qE2/Y2aixYHVIui15eBqF2L06yXOt53YFcC1+pxjrp91xHxw== dependencies: - "@abp/jquery" "~4.1.0-rc.1" + "@abp/jquery" "~4.1.0-rc.2" toastr "^2.1.4" -"@abp/utils@^4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-4.1.0-rc.1.tgz#2863867985db9d178a5ce4347309f060f1ce6142" - integrity sha512-C8e+x5/IdkJWQ8gLtO7ygsth5sd1iXKn0ARu/5u0g11nMjHsMY9Qkwg5QrnpHp2ws1+FL1Dg67omrQp9+KK5SA== +"@abp/utils@^4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-4.1.0-rc.2.tgz#eb6dbf0ee493d0f050b37347d2d6d283098aedae" + integrity sha512-V2k5I89lVBoeGIKgg4p2H9GlMAcDWbctwKZPVwBEMVEVm1uTR2xQAWdTdSFd5Q8I8Xsf/aIG8ELM7l5j2h7/zQ== dependencies: just-compare "^1.3.0" @@ -2321,6 +2336,11 @@ stack-trace@0.0.10: resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= +star-rating-svg@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/star-rating-svg/-/star-rating-svg-3.5.0.tgz#72b147015a433da63153fb607af6d51c7c1ea364" + integrity sha1-crFHAVpDPaYxU/tgevbVHHweo2Q= + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" From 02810032e8ff1b6bd3eb0d68f5ce0744534e1372 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 11:37:20 +0300 Subject: [PATCH 14/54] Add migrations for Content & Tags --- ...224075340_Added_ContentAndTags.Designer.cs | 1577 +++++++++++++++++ .../20201224075340_Added_ContentAndTags.cs | 99 ++ .../UnifiedDbContextModelSnapshot.cs | 163 ++ 3 files changed, 1839 insertions(+) create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.Designer.cs create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.cs diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.Designer.cs new file mode 100644 index 0000000000..28f86174e7 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.Designer.cs @@ -0,0 +1,1577 @@ +// +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("20201224075340_Added_ContentAndTags")] + partial class Added_ContentAndTags + { + 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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("EntityId") + .HasColumnType("uniqueidentifier"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("TenantId", "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") + .IsRequired() + .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/20201224075340_Added_ContentAndTags.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.cs new file mode 100644 index 0000000000..572bef4266 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.cs @@ -0,0 +1,99 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Volo.CmsKit.Migrations +{ + public partial class Added_ContentAndTags : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "CmsContents", + 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), + EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(max)", 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_CmsContents", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsEntityTags", + columns: table => new + { + TagId = table.Column(type: "uniqueidentifier", nullable: false), + EntityId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsEntityTags", x => new { x.TenantId, x.EntityId, x.TagId }); + }); + + migrationBuilder.CreateTable( + name: "CmsTags", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + 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: 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_CmsTags", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_CmsContents_TenantId_EntityType_EntityId", + table: "CmsContents", + columns: new[] { "TenantId", "EntityType", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsEntityTags_TenantId_EntityId_TagId", + table: "CmsEntityTags", + columns: new[] { "TenantId", "EntityId", "TagId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsTags_TenantId_Name", + table: "CmsTags", + columns: new[] { "TenantId", "Name" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "CmsContents"); + + migrationBuilder.DropTable( + name: "CmsEntityTags"); + + migrationBuilder.DropTable( + name: "CmsTags"); + } + } +} 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 a082d0db17..78f5a086d4 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 @@ -1096,6 +1096,78 @@ namespace Volo.CmsKit.Migrations 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") @@ -1175,6 +1247,97 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsUserReactions"); }); + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("EntityId") + .HasColumnType("uniqueidentifier"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("TenantId", "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") + .IsRequired() + .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") From 5aade06e8bfe98c8a270e2719b57ca819f646ac7 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 12:13:27 +0300 Subject: [PATCH 15/54] Update wwwroot of CmsKit --- .../star-rating-svg/css/star-rating-svg.css | 37 +++++++++++++++++++ .../js/jquery.star-rating-svg.min.js | 1 + 2 files changed, 38 insertions(+) create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/css/star-rating-svg.css create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/js/jquery.star-rating-svg.min.js diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/css/star-rating-svg.css b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/css/star-rating-svg.css new file mode 100644 index 0000000000..2c0114687f --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/css/star-rating-svg.css @@ -0,0 +1,37 @@ +.jq-stars { + display: inline-block; +} + +.jq-rating-label { + font-size: 22px; + display: inline-block; + position: relative; + vertical-align: top; + font-family: helvetica, arial, verdana; +} + +.jq-star { + width: 100px; + height: 100px; + display: inline-block; + cursor: pointer; +} + +.jq-star-svg { + width: 100%; + height: 100% ; +} + +.jq-star:hover .fs-star-svg polygon { +} + +.jq-star-svg polygon { + stroke: #000; + stroke-linejoin: round; +} + +/* un-used */ +.jq-shadow { + -webkit-filter: drop-shadow( -2px -2px 2px #888 ); + filter: drop-shadow( -2px -2px 2px #888 ); +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/js/jquery.star-rating-svg.min.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/js/jquery.star-rating-svg.min.js new file mode 100644 index 0000000000..df947cfe2b --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/js/jquery.star-rating-svg.min.js @@ -0,0 +1 @@ +!function(a){"use strict";var b="starRating",c=function(){},d={totalStars:5,useFullStars:!1,emptyColor:"lightgray",hoverColor:"orange",activeColor:"gold",useGradient:!0,readOnly:!1,disableAfterRate:!0,starGradient:{start:"#FEF7CD",end:"#FF9511"},strokeWidth:0,strokeColor:"black",initialRating:0,starSize:40,callback:c,onHover:c,onLeave:c},e=function(c,e){var f;this.element=c,this.$el=a(c),this.settings=a.extend({},d,e),f=this.$el.data("rating")||this.settings.initialRating,this._state={rating:(Math.round(2*f)/2).toFixed(1)},this._uid=Math.floor(999*Math.random()),e.starGradient||this.settings.useGradient||(this.settings.starGradient.start=this.settings.starGradient.end=this.settings.activeColor),this._defaults=d,this._name=b,this.init()},f={init:function(){this.renderMarkup(),this.addListeners(),this.initRating()},addListeners:function(){this.settings.readOnly||(this.$stars.on("mouseover",this.hoverRating.bind(this)),this.$stars.on("mouseout",this.restoreState.bind(this)),this.$stars.on("click",this.handleRating.bind(this)))},hoverRating:function(a){var b=this.getIndex(a);this.paintStars(b,"hovered"),this.settings.onHover(b+1,this._state.rating,this.$el)},handleRating:function(a){var b=this.getIndex(a),c=b+1;this.applyRating(c,this.$el),this.executeCallback(c,this.$el),this.settings.disableAfterRate&&this.$stars.off()},applyRating:function(a){var b=a-1;this.paintStars(b,"active"),this._state.rating=b+1},restoreState:function(a){var b=this.getIndex(a),c=this._state.rating||-1;this.paintStars(c-1,"active"),this.settings.onLeave(b+1,this._state.rating,this.$el)},getIndex:function(b){var c=a(b.currentTarget),d=c.width(),e=a(b.target).attr("data-side");e=e?e:this.getOffsetByPixel(b,c,d),e=this.settings.useFullStars?"right":e;var f=c.index()-("left"===e?.5:0);return f=.5>f&&b.offsetX=d&&!this.settings.useFullStars?"left":"right"},initRating:function(){this.paintStars(this._state.rating-1,"active")},paintStars:function(b,c){var d,e,f,g;a.each(this.$stars,function(h,i){d=a(i).find('polygon[data-side="left"]'),e=a(i).find('polygon[data-side="right"]'),f=g=b>=h?c:"empty",f=h-b===.5?c:f,d.attr("class","svg-"+f+"-"+this._uid),e.attr("class","svg-"+g+"-"+this._uid)}.bind(this))},renderMarkup:function(){for(var a='
"+this.getLinearGradient(this._uid+"_SVGID_1_",this.settings.emptyColor,this.settings.emptyColor)+this.getLinearGradient(this._uid+"_SVGID_2_",this.settings.hoverColor,this.settings.hoverColor)+this.getLinearGradient(this._uid+"_SVGID_3_",this.settings.starGradient.start,this.settings.starGradient.end)+'
',b="",c=0;c '},executeCallback:function(a,b){var c=this.settings.callback;c(a,b)}},g={unload:function(){var c="plugin_"+b,d=a(this),e=d.data(c).$stars;e.off(),d.removeData(c).remove()},setRating:function(c,d){var e="plugin_"+b,f=a(this),g=f.data(e);c>g.settings.totalStars||0>c||(d&&(c=Math.round(c)),g.applyRating(c))},getRating:function(){var c="plugin_"+b,d=a(this),e=d.data(c);return e._state.rating}};a.extend(e.prototype,f),a.fn[b]=function(c){if(!a.isPlainObject(c)){if(g.hasOwnProperty(c))return g[c].apply(this,Array.prototype.slice.call(arguments,1));a.error("Method "+c+" does not exist on "+b+".js")}return this.each(function(){a.data(this,"plugin_"+b)||a.data(this,"plugin_"+b,new e(this,c))})}}(jQuery,window,document); \ No newline at end of file From fdb55de819abafb33811d325dfe0d61a09394b2e Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 12:16:24 +0300 Subject: [PATCH 16/54] Add ContentViewComponent --- .../Volo/CmsKit/Contents/ContentDto.cs | 10 ++++ .../CmsKit/Contents/IContentAppService.cs | 10 ++++ ...msKitCommonApplicationAutoMapperProfile.cs | 13 +++++ .../CmsKit/CmsKitCommonApplicationModule.cs | 7 +++ .../Volo/CmsKit/Contents/ContentAppService.cs | 25 +++++++++ .../Contents/ContentViewComponent.cs | 55 +++++++++++++++++++ .../Shared/Components/Contents/Default.cshtml | 8 +++ .../CmsKit/Contents/IContentRepository.cs | 11 +++- .../Contents/EfCoreContentRepository.cs | 17 ++++++ .../Contents/MongoContentRepository.cs | 17 ++++++ 10 files changed, 171 insertions(+), 2 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/ContentDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/ContentDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/ContentDto.cs new file mode 100644 index 0000000000..100626fb6d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/ContentDto.cs @@ -0,0 +1,10 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Contents +{ + public class ContentDto : EntityDto + { + public string Value { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs new file mode 100644 index 0000000000..0ac862e787 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs @@ -0,0 +1,10 @@ +using System.Threading.Tasks; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Contents +{ + public interface IContentAppService + { + Task GetAsync(string entityType, string entityId); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs new file mode 100644 index 0000000000..b7cb5e2210 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs @@ -0,0 +1,13 @@ +using AutoMapper; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Common.Application.Volo.CmsKit +{ + public class CmsKitCommonApplicationAutoMapperProfile : Profile + { + public CmsKitCommonApplicationAutoMapperProfile() + { + CreateMap(); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs index 5300afdcda..8fa08fa950 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs @@ -12,5 +12,12 @@ namespace Volo.CmsKit )] public class CmsKitCommonApplicationModule : AbpModule { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.AddMaps(validate: true); + }); + } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs new file mode 100644 index 0000000000..77f2fe39ef --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Volo.CmsKit.Contents +{ + public class ContentAppService : CmsKitAppServiceBase, IContentAppService + { + private readonly IContentRepository _contentRepository; + + public ContentAppService(IContentRepository contentRepository) + { + _contentRepository = contentRepository; + } + + public async Task GetAsync(string entityType, string entityId) + { + var entity = await _contentRepository.FindAsync(entityType, entityId); // Tenant??? + + return ObjectMapper.Map(entity); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs new file mode 100644 index 0000000000..012768b0d7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI; +using Volo.Abp.AspNetCore.Mvc.UI.Widgets; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Web.Contents; + +namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents +{ + [ViewComponent(Name = "CmsContent")] + public class ContentViewComponent : AbpViewComponent + { + private readonly IContentRenderer contentRenderer; + private readonly IContentAppService contentAppService; + + public ContentViewComponent( + IContentRenderer contentRenderer, + IContentAppService contentAppService) + { + this.contentRenderer = contentRenderer; + this.contentAppService = contentAppService; + } + + public virtual async Task InvokeAsync( + string entityType, + string entityId) + { + var content = await contentAppService.GetAsync(entityType, entityId); + var viewModel = new ContentViewModel + { + EntityId = entityId, + EntityType = entityType, + ContentId = content.Id, + Rendered = await contentRenderer.RenderAsync(content.Value) + }; + + return View("~/Pages/CmsKit/Shared/Components/Contents/Default.cshtml", viewModel); + } + + public class ContentViewModel + { + public Guid ContentId { get; set; } + public string EntityType { get; set; } + + public string EntityId { get; set; } + + public string Rendered { get; set; } + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml new file mode 100644 index 0000000000..f5bd0ba344 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml @@ -0,0 +1,8 @@ +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.CmsKit.Localization +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents +@model ContentViewComponent.ContentViewModel + +
+ @Html.Raw(Model.Rendered) +
diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs index 994d2bd4ab..2adbab8e5a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs @@ -1,10 +1,17 @@ -using System; +using JetBrains.Annotations; +using System; +using System.Threading; +using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; namespace Volo.CmsKit.Contents { public interface IContentRepository : IBasicRepository { - + Task FindAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default); } } \ No newline at end of file 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 592fccb883..3522eed022 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 @@ -1,4 +1,6 @@ using System; +using System.Threading; +using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -10,5 +12,20 @@ namespace Volo.CmsKit.Contents public EfCoreContentRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } + + public Task FindAsync( + string entityType, + string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return FindAsync(x => + !x.IsDeleted && + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: cancellationToken + ); + } } } \ No newline at end of file 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 e29b53d417..f9a65bb469 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 @@ -1,4 +1,6 @@ using System; +using System.Threading; +using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Contents; @@ -10,5 +12,20 @@ namespace Volo.CmsKit.MongoDB.Contents public MongoContentRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) { } + + public Task FindAsync( + string entityType, + string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return FindAsync(x => + !x.IsDeleted && + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: cancellationToken + ); + } } } \ No newline at end of file From 5ff01929ee7c9e9e0ef2e8fdf5833fae908e75b8 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 12:17:36 +0300 Subject: [PATCH 17/54] Render static content in a razor page --- .../host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml index e61017dd4b..78986a8a99 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml @@ -7,6 +7,7 @@ @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents @model IndexModel @inject IStringLocalizer Localizer

CMS Kit DEMO

@@ -14,10 +15,9 @@ -

- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -

-

- Martin Fowler

+ + @await Component.InvokeAsync(typeof(ContentViewComponent), new { entityType = "quote", entityId = "1" }) +
@@ -71,4 +71,4 @@ @await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "2" }) } - + From 5461d4436be0ed2cb11063edfd5207c962829a66 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Thu, 24 Dec 2020 15:41:20 +0300 Subject: [PATCH 18/54] Update ContentAppService.cs --- .../Volo/CmsKit/Contents/ContentAppService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs index 77f2fe39ef..89916275bd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs @@ -8,16 +8,16 @@ namespace Volo.CmsKit.Contents { public class ContentAppService : CmsKitAppServiceBase, IContentAppService { - private readonly IContentRepository _contentRepository; + protected readonly IContentRepository ContentRepository; public ContentAppService(IContentRepository contentRepository) { - _contentRepository = contentRepository; + ContentRepository = contentRepository; } - public async Task GetAsync(string entityType, string entityId) + public virtual async Task GetAsync(string entityType, string entityId) { - var entity = await _contentRepository.FindAsync(entityType, entityId); // Tenant??? + var entity = await ContentRepository.FindAsync(entityType, entityId); // Tenant??? return ObjectMapper.Map(entity); } From 81a0f166f4aad3367f57079f38d092b47ea0672a Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 17:03:24 +0300 Subject: [PATCH 19/54] Refactor Content --- .../Volo/CmsKit/Contents/GetContentInput.cs | 8 ++++++ .../CmsKit/Contents/IContentAppService.cs | 4 +-- .../Volo/CmsKit/Contents/ContentAppService.cs | 8 ++++-- .../Controllers/Contents/ContentController.cs | 25 +++++++++++++++++++ .../Contents/ContentViewComponent.cs | 8 +++++- 5 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/GetContentInput.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/GetContentInput.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/GetContentInput.cs new file mode 100644 index 0000000000..8efddd1e35 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/GetContentInput.cs @@ -0,0 +1,8 @@ +namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents +{ + public class GetContentInput + { + public string EntityType { get; set; } + public string EntityId { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs index 0ac862e787..714fb6e4fb 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs @@ -1,10 +1,10 @@ using System.Threading.Tasks; -using Volo.CmsKit.Contents; +using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; namespace Volo.CmsKit.Contents { public interface IContentAppService { - Task GetAsync(string entityType, string entityId); + Task GetAsync(GetContentInput input); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs index 77f2fe39ef..14dc318a4d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; namespace Volo.CmsKit.Contents { @@ -15,9 +16,12 @@ namespace Volo.CmsKit.Contents _contentRepository = contentRepository; } - public async Task GetAsync(string entityType, string entityId) + public async Task GetAsync(GetContentInput input) { - var entity = await _contentRepository.FindAsync(entityType, entityId); // Tenant??? + var entity = await _contentRepository.FindAsync( + input.EntityType, + input.EntityId, + CurrentTenant.Id); return ObjectMapper.Map(entity); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs new file mode 100644 index 0000000000..260668e52d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Controllers.Contents +{ + public class ContentController : CmsKitControllerBase, IContentAppService + { + protected readonly IContentAppService _contentAppService; + + public ContentController(IContentAppService contentAppService) + { + _contentAppService = contentAppService; + } + + public virtual Task GetAsync(GetContentInput input) + { + return _contentAppService.GetAsync(input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs index 012768b0d7..14522303c6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI; using Volo.Abp.AspNetCore.Mvc.UI.Widgets; +using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; using Volo.CmsKit.Contents; using Volo.CmsKit.Web.Contents; @@ -30,7 +31,12 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents string entityType, string entityId) { - var content = await contentAppService.GetAsync(entityType, entityId); + var content = await contentAppService.GetAsync(new GetContentInput + { + EntityId = entityId, + EntityType = entityType + }); + var viewModel = new ContentViewModel { EntityId = entityId, From a80aeb940a951514108fd1094369132914301fea Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 17:05:35 +0300 Subject: [PATCH 20/54] CmsKit Tags Scheme Update --- .../Volo/CmsKit/Tags/EntityTag.cs | 6 ++-- .../Volo/CmsKit/Tags/ITagRepository.cs | 7 +++++ .../CmsKitDbContextModelCreatingExtensions.cs | 4 +-- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 31 +++++++++++++++++-- .../CmsKit/MongoDB/Tags/MongoTagRepository.cs | 6 ++++ 5 files changed, 46 insertions(+), 8 deletions(-) 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 5825f32936..e69dbf53aa 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 @@ -8,7 +8,7 @@ namespace Volo.CmsKit.Tags { public virtual Guid TagId { get; set; } - public virtual Guid EntityId { get; set; } + public virtual string EntityId { get; set; } public virtual Guid? TenantId { get; } @@ -16,7 +16,7 @@ namespace Volo.CmsKit.Tags { } - public EntityTag(Guid tagId, Guid entityId, Guid? tenantId = null) + public EntityTag(Guid tagId, string entityId, Guid? tenantId = null) { TagId = tagId; EntityId = entityId; @@ -25,7 +25,7 @@ namespace Volo.CmsKit.Tags public override object[] GetKeys() { - return new object[] { TagId, EntityId, TenantId }; + return new object[] { TagId, EntityId }; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs index 8cfeee9551..c33c577422 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs @@ -1,5 +1,6 @@ using JetBrains.Annotations; using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; @@ -25,5 +26,11 @@ namespace Volo.CmsKit.Tags [NotNull] string name, Guid? tenantId, CancellationToken cancellationToken = default); + + Task> GetAllRelatedTagsAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default); } } 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 f7cdb5b59e..2d6441b19e 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 @@ -117,7 +117,7 @@ namespace Volo.CmsKit.EntityFrameworkCore b.Property(x => x.EntityType).IsRequired().HasMaxLength(TagConsts.MaxEntityTypeLength); b.Property(x => x.Name).IsRequired().HasMaxLength(TagConsts.MaxNameLength); - b.Property(x => x.HexColor).IsRequired().HasMaxLength(TagConsts.MaxColorHexLength); + b.Property(x => x.HexColor).HasMaxLength(TagConsts.MaxColorHexLength); b.HasIndex(x => new { x.TenantId, x.Name }); }); @@ -128,7 +128,7 @@ namespace Volo.CmsKit.EntityFrameworkCore b.ConfigureByConvention(); - b.HasKey(x => new { x.TenantId, x.EntityId, x.TagId }); + b.HasKey(x => new { x.EntityId, x.TagId }); b.Property(x => x.EntityId).IsRequired(); b.Property(x => x.TagId).IsRequired(); 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 8a530ba705..5bbecd3629 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 @@ -1,11 +1,14 @@ using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using System; +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 @@ -16,7 +19,7 @@ namespace Volo.CmsKit.Tags { } - public Task AnyAsync( + public virtual Task AnyAsync( [NotNull] string entityType, [NotNull] string name, Guid? tenantId, @@ -29,7 +32,7 @@ namespace Volo.CmsKit.Tags cancellationToken); } - public Task GetAsync( + public virtual Task GetAsync( [NotNull] string entityType, [NotNull] string name, Guid? tenantId, @@ -42,7 +45,7 @@ namespace Volo.CmsKit.Tags cancellationToken: cancellationToken); } - public Task FindAsync( + public virtual Task FindAsync( [NotNull] string entityType, [NotNull] string name, Guid? tenantId, @@ -54,5 +57,27 @@ namespace Volo.CmsKit.Tags x.TenantId == tenantId, cancellationToken: cancellationToken); } + + public virtual async Task> GetAllRelatedTagsAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + + var query = DbContext.Set() + .Where(x => + x.EntityId == entityId && + x.TenantId == tenantId + ) + .Join( + DbSet, + o => o.TagId, + i => i.Id, + (entityTag, tag) => tag) + .Where(x => x.EntityType == entityType); + + return await query.ToListAsync(); + } } } 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 9d4644e47b..ca88721460 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 @@ -1,6 +1,7 @@ using JetBrains.Annotations; using MongoDB.Driver.Linq; using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.MongoDB; @@ -54,5 +55,10 @@ namespace Volo.CmsKit.MongoDB.Tags x.TenantId == tenantId, cancellationToken: cancellationToken); } + + public Task> GetAllRelatedTagsAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + { + throw new NotImplementedException(); + } } } From 7e7dd42f2d6b646a1fa63218622f46f365a37790 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 17:06:09 +0300 Subject: [PATCH 21/54] Rename CmsKitAppService --- .../Volo/CmsKit/{CmsKitAdminAppService.cs => CmsKitAppService.cs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/{CmsKitAdminAppService.cs => CmsKitAppService.cs} (100%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppService.cs similarity index 100% rename from modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAdminAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppService.cs From 65e481b0158039a768ceac4e754c91fb4042c83d Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 17:07:07 +0300 Subject: [PATCH 22/54] CmsKit Tags AppServices & ViewComponent --- .../Volo/CmsKit/Tags/GetRelatedTagsInput.cs | 16 +++++ .../Volo/CmsKit/Tags/ITagAppService.cs | 11 ++++ .../Volo/CmsKit/Tags/TagDto.cs | 14 +++++ ...msKitCommonApplicationAutoMapperProfile.cs | 3 + .../Volo/CmsKit/Tags/TagAppService.cs | 58 +++++++++++++++++++ .../CmsKit/Controllers/Tags/TagController.cs | 22 +++++++ .../Shared/Components/Tags/Default.cshtml | 13 +++++ .../Components/Tags/TagViewComponent.cs | 51 ++++++++++++++++ .../CmsKit/Shared/Components/Tags/default.css | 4 ++ .../Volo.CmsKit.Common.Web.csproj | 4 ++ 10 files changed, 196 insertions(+) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/GetRelatedTagsInput.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/ITagAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Tags/TagController.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/default.css diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/GetRelatedTagsInput.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/GetRelatedTagsInput.cs new file mode 100644 index 0000000000..0019bbd661 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/GetRelatedTagsInput.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Tags +{ + public class GetRelatedTagsInput + { + [Required] + public string EntityType { get; set; } + + [Required] + public string EntityId { get; set; } + + public List Tags { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/ITagAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/ITagAppService.cs new file mode 100644 index 0000000000..f831d0f735 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/ITagAppService.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Volo.CmsKit.Tags +{ + public interface ITagAppService : IApplicationService + { + Task> GetAllRelatedTagsAsync(GetRelatedTagsInput input); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs new file mode 100644 index 0000000000..4b9e4a5897 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Tags +{ + public class TagDto : EntityDto + { + public string EntityType { get; set; } + + public string Name { get; protected set; } + + public string HexColor { get; protected set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs index b7cb5e2210..c7be0fcc69 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs @@ -1,5 +1,6 @@ using AutoMapper; using Volo.CmsKit.Contents; +using Volo.CmsKit.Tags; namespace Volo.CmsKit.Common.Application.Volo.CmsKit { @@ -8,6 +9,8 @@ namespace Volo.CmsKit.Common.Application.Volo.CmsKit public CmsKitCommonApplicationAutoMapperProfile() { CreateMap(); + + CreateMap(); } } } 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 new file mode 100644 index 0000000000..c9ddef9629 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Volo.CmsKit.Tags +{ + public class TagAppService : CmsKitAppServiceBase, ITagAppService + { + protected readonly ITagManager TagManager; + protected readonly ITagRepository TagRepository; + protected readonly IEntityTagRepository EntityTagRepository; + + public TagAppService( + ITagManager tagManager, + ITagRepository tagRepository, IEntityTagRepository entityTagRepository) + { + TagManager = tagManager; + TagRepository = tagRepository; + EntityTagRepository = entityTagRepository; + } + + public virtual async Task> GetAllRelatedTagsAsync(GetRelatedTagsInput input) + { + var entities = await TagRepository.GetAllRelatedTagsAsync( + input.EntityType, + input.EntityId, + CurrentTenant.Id); + + if (input.Tags?.Count > 0) + { + var nonExisting = input.Tags + .Where(x => + !entities.Any(a => + a.Name.Equals(x.Trim(), + StringComparison.InvariantCultureIgnoreCase))); + + foreach (var tag in nonExisting) + { + var insertedTag = await TagManager.GetOrAddAsync( + input.EntityType, + tag, + tenantId: CurrentTenant?.Id); + + await EntityTagRepository.InsertAsync( + new EntityTag( + insertedTag.Id, + input.EntityId, + CurrentTenant?.Id)); + + entities.Add(insertedTag); + } + } + + return ObjectMapper.Map, List>(entities); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Tags/TagController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Tags/TagController.cs new file mode 100644 index 0000000000..b45d7fc6d4 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Tags/TagController.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.CmsKit.Controllers; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Common.HttpApi.Volo.CmsKit.Controllers.Tags +{ + public class TagController : CmsKitControllerBase, ITagAppService + { + protected readonly ITagAppService TagAppService; + + public TagController(ITagAppService tagAppService) + { + TagAppService = tagAppService; + } + + public Task> GetAllRelatedTagsAsync(GetRelatedTagsInput input) + { + return TagAppService.GetAllRelatedTagsAsync(input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml new file mode 100644 index 0000000000..e0e9a034a3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml @@ -0,0 +1,13 @@ +@using Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Tags + +@model TagViewComponent.TagViewModel + +@if (Model.Tags != null) +{ + foreach (var tag in Model.Tags) + { + + @tag.Name + + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs new file mode 100644 index 0000000000..83ad0e7e3a --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs @@ -0,0 +1,51 @@ +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.AspNetCore.Mvc; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Tags +{ + [ViewComponent(Name = "CmsTags")] + public class TagViewComponent : AbpViewComponent + { + protected readonly ITagAppService TagAppService; + + public TagViewComponent(ITagAppService tagAppService) + { + TagAppService = tagAppService; + } + + public virtual async Task InvokeAsync( + string entityType, + string entityId, + IEnumerable tags = null) + { + var tagDtos = await TagAppService.GetAllRelatedTagsAsync(new GetRelatedTagsInput + { + EntityId = entityId, + EntityType = entityType, + Tags = tags?.ToList() + }); + + var viewModel = new TagViewModel + { + EntityId = entityId, + EntityType = entityType, + Tags = tagDtos + }; + + return View("~/Pages/CmsKit/Shared/Components/Tags/Default.cshtml", viewModel); + } + + public class TagViewModel + { + public List Tags { get; set; } + public string EntityId { get; set; } + public string EntityType { get; set; } + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/default.css b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/default.css new file mode 100644 index 0000000000..e3f6d69107 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/default.css @@ -0,0 +1,4 @@ +.cmskit-tag { + border-radius: 2px; + border: 1px solid; +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj index 620274f4f3..132e584fc0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj @@ -35,4 +35,8 @@ + + + + From c42e046042c75735a69cfa7cc9eba20e02a248e3 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 17:08:09 +0300 Subject: [PATCH 23/54] CmsKit Migrations --- .../20201210071514_Initial.Designer.cs | 1414 ----------------- .../20201224075340_Added_ContentAndTags.cs | 99 -- ....cs => 20201224140744_Initial.Designer.cs} | 19 +- ...4_Initial.cs => 20201224140744_Initial.cs} | 85 + .../UnifiedDbContextModelSnapshot.cs | 15 +- 5 files changed, 101 insertions(+), 1531 deletions(-) delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.cs rename modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/{20201224075340_Added_ContentAndTags.Designer.cs => 20201224140744_Initial.Designer.cs} (99%) rename modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/{20201210071514_Initial.cs => 20201224140744_Initial.cs} (90%) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs deleted file mode 100644 index 449f18fb53..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs +++ /dev/null @@ -1,1414 +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("20201210071514_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.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.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/20201224075340_Added_ContentAndTags.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.cs deleted file mode 100644 index 572bef4266..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class Added_ContentAndTags : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "CmsContents", - 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), - EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Value = table.Column(type: "nvarchar(max)", 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_CmsContents", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CmsEntityTags", - columns: table => new - { - TagId = table.Column(type: "uniqueidentifier", nullable: false), - EntityId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CmsEntityTags", x => new { x.TenantId, x.EntityId, x.TagId }); - }); - - migrationBuilder.CreateTable( - name: "CmsTags", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - 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: 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_CmsTags", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_CmsContents_TenantId_EntityType_EntityId", - table: "CmsContents", - columns: new[] { "TenantId", "EntityType", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsEntityTags_TenantId_EntityId_TagId", - table: "CmsEntityTags", - columns: new[] { "TenantId", "EntityId", "TagId" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsTags_TenantId_Name", - table: "CmsTags", - columns: new[] { "TenantId", "Name" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CmsContents"); - - migrationBuilder.DropTable( - name: "CmsEntityTags"); - - migrationBuilder.DropTable( - name: "CmsTags"); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs similarity index 99% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.Designer.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs index 28f86174e7..7ced9b3a54 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224075340_Added_ContentAndTags.Designer.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs @@ -11,8 +11,8 @@ using Volo.CmsKit.EntityFrameworkCore; namespace Volo.CmsKit.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20201224075340_Added_ContentAndTags")] - partial class Added_ContentAndTags + [Migration("20201224140744_Initial")] + partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -1251,17 +1251,17 @@ namespace Volo.CmsKit.Migrations modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => { - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("EntityId") - .HasColumnType("uniqueidentifier"); + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); b.Property("TagId") .HasColumnType("uniqueidentifier"); - b.HasKey("TenantId", "EntityId", "TagId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); b.HasIndex("TenantId", "EntityId", "TagId"); @@ -1306,7 +1306,6 @@ namespace Volo.CmsKit.Migrations .HasColumnName("ExtraProperties"); b.Property("HexColor") - .IsRequired() .HasMaxLength(6) .HasColumnType("nvarchar(6)"); diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs similarity index 90% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs index 54f7ac975c..826acae0d9 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs @@ -269,6 +269,43 @@ namespace Volo.CmsKit.Migrations table.PrimaryKey("PK_CmsComments", x => x.Id); }); + migrationBuilder.CreateTable( + name: "CmsContents", + 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), + EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(max)", 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_CmsContents", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsEntityTags", + columns: table => new + { + TagId = table.Column(type: "uniqueidentifier", nullable: false), + EntityId = table.Column(type: "nvarchar(450)", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsEntityTags", x => new { x.EntityId, x.TagId }); + }); + migrationBuilder.CreateTable( name: "CmsRatings", columns: table => new @@ -286,6 +323,30 @@ namespace Volo.CmsKit.Migrations table.PrimaryKey("PK_CmsRatings", x => x.Id); }); + migrationBuilder.CreateTable( + name: "CmsTags", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + 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), + 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_CmsTags", x => x.Id); + }); + migrationBuilder.CreateTable( name: "CmsUserReactions", columns: table => new @@ -736,11 +797,26 @@ namespace Volo.CmsKit.Migrations table: "CmsComments", columns: new[] { "TenantId", "RepliedCommentId" }); + migrationBuilder.CreateIndex( + name: "IX_CmsContents_TenantId_EntityType_EntityId", + table: "CmsContents", + columns: new[] { "TenantId", "EntityType", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsEntityTags_TenantId_EntityId_TagId", + table: "CmsEntityTags", + columns: new[] { "TenantId", "EntityId", "TagId" }); + migrationBuilder.CreateIndex( name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", table: "CmsRatings", columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); + migrationBuilder.CreateIndex( + name: "IX_CmsTags_TenantId_Name", + table: "CmsTags", + columns: new[] { "TenantId", "Name" }); + migrationBuilder.CreateIndex( name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", table: "CmsUserReactions", @@ -815,9 +891,18 @@ namespace Volo.CmsKit.Migrations migrationBuilder.DropTable( name: "CmsComments"); + migrationBuilder.DropTable( + name: "CmsContents"); + + migrationBuilder.DropTable( + name: "CmsEntityTags"); + migrationBuilder.DropTable( name: "CmsRatings"); + migrationBuilder.DropTable( + name: "CmsTags"); + migrationBuilder.DropTable( name: "CmsUserReactions"); 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 78f5a086d4..49468416a0 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 @@ -1249,17 +1249,17 @@ namespace Volo.CmsKit.Migrations modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => { - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("EntityId") - .HasColumnType("uniqueidentifier"); + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); b.Property("TagId") .HasColumnType("uniqueidentifier"); - b.HasKey("TenantId", "EntityId", "TagId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); b.HasIndex("TenantId", "EntityId", "TagId"); @@ -1304,7 +1304,6 @@ namespace Volo.CmsKit.Migrations .HasColumnName("ExtraProperties"); b.Property("HexColor") - .IsRequired() .HasMaxLength(6) .HasColumnType("nvarchar(6)"); From 16ff0a25f252fc909d3c1e41b703547168ecc384 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 17:08:42 +0300 Subject: [PATCH 24/54] CmsKit Tags presentation --- .../Pages/Index.cshtml | 24 ++++++++++++++++++- .../Pages/_ViewImports.cshtml | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml index 78986a8a99..1bfd46cdac 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml @@ -8,6 +8,7 @@ @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents +@using Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Tags @model IndexModel @inject IStringLocalizer Localizer

CMS Kit DEMO

@@ -17,11 +18,20 @@ @await Component.InvokeAsync(typeof(ContentViewComponent), new { entityType = "quote", entityId = "1" }) - + + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = "quote", + entityId = "1", + tags = new List { "a", "b" } + }) + + + @if (GlobalFeatureManager.Instance.IsEnabled()) @@ -72,3 +82,15 @@ } + + + + + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = "IndexPage", + entityId = Guid.Empty.ToString(), + tags = new List { "a", "b" } + }) + + diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/_ViewImports.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/_ViewImports.cshtml index da4fb49a47..b059f6fec9 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/_ViewImports.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/_ViewImports.cshtml @@ -3,3 +3,4 @@ @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling @addTagHelper *, Volo.CmsKit.Public.Web +@addTagHelper *, Volo.CmsKit.Common.Web From 995a4e2ff2bd1270890bf500d24386cc1a3aa06f Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 24 Dec 2020 17:29:34 +0300 Subject: [PATCH 25/54] Fix naming convention of ContentRepository --- .../Volo/CmsKit/Contents/ContentAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs index a256277780..a26dd1f006 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs @@ -18,7 +18,7 @@ namespace Volo.CmsKit.Contents public virtual async Task GetAsync(GetContentInput input) { - var entity = await _contentRepository.FindAsync( + var entity = await ContentRepository.FindAsync( input.EntityType, input.EntityId, CurrentTenant.Id); From 16031038833688ecde7d3610640d6519cf908895 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 25 Dec 2020 12:19:31 +0300 Subject: [PATCH 26/54] Created and configured Page entity --- .../Volo/CmsKit/Pages/PageConsts.cs | 11 ++++++ .../Volo/CmsKit/Pages/IPageRepository.cs | 10 +++++ .../Volo/CmsKit/Pages/Page.cs | 38 +++++++++++++++++++ .../CmsKitDbContextModelCreatingExtensions.cs | 14 +++++++ .../CmsKitEntityFrameworkCoreModule.cs | 2 + .../Volo/CmsKit/Pages/EfCorePageRepository.cs | 14 +++++++ .../CmsKit/MongoDB/CmsKitMongoDbContext.cs | 3 ++ .../MongoDB/CmsKitMongoDbContextExtensions.cs | 6 +++ .../CmsKit/MongoDB/CmsKitMongoDbModule.cs | 3 ++ .../CmsKit/MongoDB/ICmsKitMongoDbContext.cs | 3 ++ .../MongoDB/Pages/MongoPageRepository.cs | 14 +++++++ 11 files changed, 118 insertions(+) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs 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 new file mode 100644 index 0000000000..f0b5032ee7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs @@ -0,0 +1,11 @@ +namespace Volo.CmsKit.Pages +{ + public class PageConsts + { + public const int MaxTitleLength = 256; + + public const int MaxUrlLength = 256; + + public const int MaxDescriptionLength = 515; + } +} \ No newline at end of file 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 new file mode 100644 index 0000000000..938bbf9cd4 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs @@ -0,0 +1,10 @@ +using System; +using Volo.Abp.Domain.Repositories; + +namespace Volo.CmsKit.Pages +{ + public interface IPageRepository : IBasicRepository + { + + } +} \ 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 new file mode 100644 index 0000000000..0a4dd57cc5 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs @@ -0,0 +1,38 @@ +using System; +using JetBrains.Annotations; +using Volo.Abp; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Volo.CmsKit.Pages +{ + public class Page : FullAuditedAggregateRoot, IMultiTenant + { + public Guid? TenantId { get; } + + public virtual string Title { get; set; } + + public virtual string Description { get; set; } + + public virtual string Url { get; set; } + + protected Page() + { + + } + + public Page(Guid id, [NotNull] string title, [CanBeNull] string description, [CanBeNull] string url = null, Guid? tenantId = null) : base(id) + { + Title = Check.NotNullOrWhiteSpace(title, nameof(title), PageConsts.MaxTitleLength); + Description = Check.Length(description, nameof(description), PageConsts.MaxDescriptionLength); + SetUrl(url); + + TenantId = tenantId; + } + + public virtual void SetUrl(string url) + { + Url = Check.Length(url, nameof(url), PageConsts.MaxUrlLength); + } + } +} \ 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 2d6441b19e..200401e4c2 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 @@ -10,6 +10,7 @@ using Volo.CmsKit.Users; using Volo.Abp.Users.EntityFrameworkCore; using Volo.CmsKit.Contents; using Volo.CmsKit.GlobalFeatures; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Tags; @@ -135,6 +136,19 @@ namespace Volo.CmsKit.EntityFrameworkCore b.HasIndex(x => new { x.TenantId, x.EntityId, x.TagId }); }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "Pages", options.Schema); + + b.ConfigureByConvention(); + + b.Property(x => x.Title).IsRequired().HasMaxLength(PageConsts.MaxTitleLength); + b.Property(x => x.Url).IsRequired().HasMaxLength(PageConsts.MaxUrlLength); + b.Property(x => x.Description).HasMaxLength(PageConsts.MaxDescriptionLength); + + b.HasIndex(x => new { x.TenantId, x.Url }); + }); } } } 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 7e2057c6f0..c995c21dfb 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 @@ -4,6 +4,7 @@ using Volo.Abp.Modularity; using Volo.Abp.Users.EntityFrameworkCore; using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Tags; @@ -29,6 +30,7 @@ namespace Volo.CmsKit.EntityFrameworkCore options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); }); } } 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 new file mode 100644 index 0000000000..9c3b323f45 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Pages +{ + public class EfCorePageRepository : EfCoreRepository, IPageRepository + { + public EfCorePageRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file 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 965cf917ec..c61d8d9a13 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 @@ -3,6 +3,7 @@ using Volo.Abp.Data; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Tags; @@ -27,6 +28,8 @@ namespace Volo.CmsKit.MongoDB public IMongoCollection Tags => Collection(); public IMongoCollection EntityTags => Collection(); + + public IMongoCollection Pages => 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 f208e5644c..7f6dcfecf3 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 @@ -3,6 +3,7 @@ using Volo.Abp; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Tags; @@ -58,6 +59,11 @@ namespace Volo.CmsKit.MongoDB { x.CollectionName = CmsKitDbProperties.DbTablePrefix + "EntityTags"; }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Pages"; + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs index d86e727a09..898b1687a8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs @@ -6,10 +6,12 @@ using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; using Volo.CmsKit.MongoDB.Comments; using Volo.CmsKit.MongoDB.Contents; +using Volo.CmsKit.MongoDB.Pages; using Volo.CmsKit.MongoDB.Ratings; using Volo.CmsKit.MongoDB.Reactions; using Volo.CmsKit.MongoDB.Tags; using Volo.CmsKit.MongoDB.Users; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Tags; @@ -35,6 +37,7 @@ namespace Volo.CmsKit.MongoDB options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); }); } } 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 5d16305567..d33a5ee371 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 @@ -3,6 +3,7 @@ using Volo.Abp.Data; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Tags; @@ -27,5 +28,7 @@ namespace Volo.CmsKit.MongoDB IMongoCollection Tags { get; } IMongoCollection EntityTags { get; } + + IMongoCollection Pages { get; } } } 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 new file mode 100644 index 0000000000..adf3d85dca --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.Pages; + +namespace Volo.CmsKit.MongoDB.Pages +{ + public class MongoPageRepository : MongoDbRepository, IPageRepository + { + public MongoPageRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file From d0c58bb55433a82258dba99d5c33270a674d9af8 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 25 Dec 2020 12:32:05 +0300 Subject: [PATCH 27/54] Added delete method to Content repository --- .../Volo/CmsKit/Contents/IContentRepository.cs | 2 ++ .../Volo/CmsKit/Contents/EfCoreContentRepository.cs | 9 +++++++++ .../CmsKit/MongoDB/Contents/MongoContentRepository.cs | 9 +++++++++ 3 files changed, 20 insertions(+) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs index 2adbab8e5a..2ebd53ce57 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs @@ -13,5 +13,7 @@ namespace Volo.CmsKit.Contents [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default); + + Task DeleteAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default); } } \ No newline at end of file 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 3522eed022..ed9fe6e0ab 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 @@ -27,5 +27,14 @@ namespace Volo.CmsKit.Contents cancellationToken: cancellationToken ); } + + public Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + { + return DeleteAsync(x => + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: cancellationToken); + } } } \ No newline at end of file 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 f9a65bb469..01542a05f0 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 @@ -27,5 +27,14 @@ namespace Volo.CmsKit.MongoDB.Contents cancellationToken: cancellationToken ); } + + public Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + { + return DeleteAsync(x => + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: cancellationToken); + } } } \ No newline at end of file From 98ed089d80d0ca82a54328d5b32ad4449da8771e Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 25 Dec 2020 12:35:27 +0300 Subject: [PATCH 28/54] Added Get method to Content Repository --- .../Volo/CmsKit/Contents/IContentRepository.cs | 6 ++++++ .../CmsKit/Contents/EfCoreContentRepository.cs | 15 +++++++++++++++ .../MongoDB/Contents/MongoContentRepository.cs | 15 +++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs index 2ebd53ce57..acd5ed2a84 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs @@ -8,6 +8,12 @@ namespace Volo.CmsKit.Contents { public interface IContentRepository : IBasicRepository { + Task GetAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + Task FindAsync( [NotNull] string entityType, [NotNull] string entityId, 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 ed9fe6e0ab..d426d1d7c5 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 @@ -13,6 +13,21 @@ namespace Volo.CmsKit.Contents { } + public Task GetAsync( + string entityType, + string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return GetAsync(x => + !x.IsDeleted && + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: cancellationToken + ); + } + public Task FindAsync( string entityType, string entityId, 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 01542a05f0..fd673cb34c 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 @@ -13,6 +13,21 @@ namespace Volo.CmsKit.MongoDB.Contents { } + public Task GetAsync( + string entityType, + string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return GetAsync(x => + !x.IsDeleted && + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: cancellationToken + ); + } + public Task FindAsync( string entityType, string entityId, From 995faff4ba12c79d209d5183e163b4cd1546caf6 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 25 Dec 2020 12:35:52 +0300 Subject: [PATCH 29/54] Update ContentAppService.cs --- .../Volo/CmsKit/Contents/ContentAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs index a26dd1f006..072a68b38d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs @@ -18,7 +18,7 @@ namespace Volo.CmsKit.Contents public virtual async Task GetAsync(GetContentInput input) { - var entity = await ContentRepository.FindAsync( + var entity = await ContentRepository.GetAsync( input.EntityType, input.EntityId, CurrentTenant.Id); From aa71e2c541d1242b0e90e4a60ca75b74d093d298 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 25 Dec 2020 12:38:32 +0300 Subject: [PATCH 30/54] Added setValue method to content entity --- .../Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 2c3cd28593..354041b51b 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 @@ -14,7 +14,7 @@ namespace Volo.CmsKit.Contents public virtual string EntityId { get; set; } - public virtual string Value { get; set; } + public virtual string Value { get; protected set; } protected Content() { @@ -25,9 +25,14 @@ namespace Volo.CmsKit.Contents { EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); - Value = Check.NotNullOrWhiteSpace(value, nameof(value), ContentConsts.MaxValueLength); + SetValue(value); TenantId = tenantId; } + + public void SetValue([NotNull] string value) + { + Value = Check.NotNullOrWhiteSpace(value, nameof(value), ContentConsts.MaxValueLength); + } } } From e404c3053252493b28fe40df479eb229ea062a53 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 25 Dec 2020 14:25:55 +0300 Subject: [PATCH 31/54] Created Page application service --- .../Volo/CmsKit/Contents/GetContentInput.cs | 2 +- .../CmsKit/Contents/IContentAppService.cs | 1 - .../Volo/CmsKit/Pages/CheckUrlInputDto.cs | 12 +++ .../Volo/CmsKit/Pages/CreatePageInputDto.cs | 19 ++++ .../Pages/CreatePageWithContentInputDto.cs | 24 +++++ .../Volo/CmsKit/Pages/IPageAppService.cs | 20 ++++ .../Volo/CmsKit/Pages/PageDto.cs | 14 +++ .../Volo/CmsKit/Pages/PageWithContentDto.cs | 17 +++ .../CmsKit/Pages/UpdatePageContentInputDto.cs | 13 +++ .../Volo/CmsKit/Pages/UpdatePageInputDto.cs | 19 ++++ ...tAppService.cs => CmsKitAppServiceBase.cs} | 0 ...msKitCommonApplicationAutoMapperProfile.cs | 5 +- .../Volo/CmsKit/Contents/ContentAppService.cs | 1 - .../Volo/CmsKit/Pages/PageAppService.cs | 100 ++++++++++++++++++ .../Controllers/Contents/ContentController.cs | 1 - .../Contents/ContentViewComponent.cs | 1 - .../Volo/CmsKit/Pages/PageConsts.cs | 6 +- .../Volo/CmsKit/Pages/IPageRepository.cs | 7 +- .../Volo/CmsKit/Pages/Page.cs | 13 +-- .../Volo/CmsKit/Pages/EfCorePageRepository.cs | 17 +++ .../MongoDB/Pages/MongoPageRepository.cs | 17 +++ 21 files changed, 290 insertions(+), 19 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CheckUrlInputDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageInputDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageWithContentInputDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/PageDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/PageWithContentDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageContentInputDto.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageInputDto.cs rename modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/{CmsKitAppService.cs => CmsKitAppServiceBase.cs} (100%) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/GetContentInput.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/GetContentInput.cs index 8efddd1e35..ab3bafc51f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/GetContentInput.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/GetContentInput.cs @@ -1,4 +1,4 @@ -namespace Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents +namespace Volo.CmsKit.Contents { public class GetContentInput { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs index 714fb6e4fb..fae0bd5271 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContentAppService.cs @@ -1,5 +1,4 @@ using System.Threading.Tasks; -using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; namespace Volo.CmsKit.Contents { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CheckUrlInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CheckUrlInputDto.cs new file mode 100644 index 0000000000..6047526e03 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CheckUrlInputDto.cs @@ -0,0 +1,12 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; + +namespace Volo.CmsKit.Pages +{ + public class CheckUrlInputDto + { + [Required] + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] + public string Url { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageInputDto.cs new file mode 100644 index 0000000000..7f5ce67260 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageInputDto.cs @@ -0,0 +1,19 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; + +namespace Volo.CmsKit.Pages +{ + public class CreatePageInputDto + { + [Required] + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] + public string Title { get; set; } + + [Required] + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] + public string Url { get; set; } + + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageWithContentInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageWithContentInputDto.cs new file mode 100644 index 0000000000..ddbf7ce373 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageWithContentInputDto.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Pages +{ + public class CreatePageWithContentInputDto + { + [Required] + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] + public string Title { get; set; } + + [Required] + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] + public string Url { get; set; } + + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] + public string Description { get; set; } + + [Required] + [DynamicMaxLength(typeof(ContentConsts), nameof(ContentConsts.MaxValueLength))] + public string Content { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs new file mode 100644 index 0000000000..0b0cf7d182 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs @@ -0,0 +1,20 @@ +using System; +using System.Threading.Tasks; + +namespace Volo.CmsKit.Pages +{ + public interface IPageAppService + { + Task CreatePageAsync(CreatePageInputDto input); + + Task CreatePageWithContentAsync(CreatePageWithContentInputDto input); + + Task UpdatePageAsync(Guid id, UpdatePageInputDto input); + + Task DoesUrlExistAsync(CheckUrlInputDto input); + + Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input); + + Task DeletePageAsync(Guid id); + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/PageDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/PageDto.cs new file mode 100644 index 0000000000..e2a10d39b5 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/PageDto.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Pages +{ + public class PageDto : EntityDto + { + public string Title { get; set; } + + public string Url { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/PageWithContentDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/PageWithContentDto.cs new file mode 100644 index 0000000000..b9ed14ab0d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/PageWithContentDto.cs @@ -0,0 +1,17 @@ +using System; +using Volo.Abp.Application.Dtos; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Pages +{ + public class PageWithContentDto : EntityDto + { + public string Title { get; set; } + + public string Url { get; set; } + + public string Description { get; set; } + + public ContentDto Content { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageContentInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageContentInputDto.cs new file mode 100644 index 0000000000..ba50ae9f30 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageContentInputDto.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Pages +{ + public class UpdatePageContentInputDto + { + [Required] + [DynamicMaxLength(typeof(ContentConsts), nameof(ContentConsts.MaxValueLength))] + public string Content { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageInputDto.cs new file mode 100644 index 0000000000..be84b97f4f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageInputDto.cs @@ -0,0 +1,19 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; + +namespace Volo.CmsKit.Pages +{ + public class UpdatePageInputDto + { + [Required] + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] + public string Title { get; set; } + + [Required] + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] + public string Url { get; set; } + + [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppServiceBase.cs similarity index 100% rename from modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppServiceBase.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs index c7be0fcc69..b0c6388c30 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs @@ -1,8 +1,9 @@ using AutoMapper; using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Tags; -namespace Volo.CmsKit.Common.Application.Volo.CmsKit +namespace Volo.CmsKit { public class CmsKitCommonApplicationAutoMapperProfile : Profile { @@ -11,6 +12,8 @@ namespace Volo.CmsKit.Common.Application.Volo.CmsKit CreateMap(); CreateMap(); + + CreateMap(); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs index 072a68b38d..c91478dd6a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Contents/ContentAppService.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; namespace Volo.CmsKit.Contents { diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs new file mode 100644 index 0000000000..435be73ecd --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs @@ -0,0 +1,100 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Pages +{ + public class PageAppService : CmsKitAppServiceBase, IPageAppService + { + protected readonly IPageRepository PageRepository; + protected readonly IContentRepository ContentRepository; + + public PageAppService(IPageRepository pageRepository, IContentRepository contentRepository) + { + PageRepository = pageRepository; + ContentRepository = contentRepository; + } + + public virtual async Task CreatePageAsync(CreatePageInputDto input) + { + var page = await CreatePageAsync(input.Title, input.Url, input.Description); + + await PageRepository.InsertAsync(page); + + return ObjectMapper.Map(page); + } + + public virtual async Task CreatePageWithContentAsync(CreatePageWithContentInputDto input) + { + var page = await CreatePageAsync(input.Title, input.Url, input.Description); + + await PageRepository.InsertAsync(page); + + var content = new Content( + GuidGenerator.Create(), + nameof(Page), + page.Id.ToString(), + input.Content, + page.TenantId); + + await ContentRepository.InsertAsync(content); + + return ObjectMapper.Map(page); + } + + public virtual async Task UpdatePageAsync(Guid id, UpdatePageInputDto input) + { + var page = await PageRepository.GetAsync(id); + + if (page.Url != input.Url) + { + await CheckPageUrlAsync(input.Url); + } + + page.Title = input.Title; + page.Url = input.Url; + page.Description = input.Description; + + await PageRepository.UpdateAsync(page); + + return ObjectMapper.Map(page); + } + + public virtual Task DoesUrlExistAsync(CheckUrlInputDto input) + { + return PageRepository.DoesExistAsync(input.Url); + } + + public virtual async Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input) + { + var pageContent = await ContentRepository.GetAsync(nameof(Page), id.ToString()); + + pageContent.SetValue(input.Content); + + await ContentRepository.UpdateAsync(pageContent); + } + + public virtual async Task DeletePageAsync(Guid id) + { + await ContentRepository.DeleteAsync(nameof(Page), id.ToString(), CurrentTenant?.Id, CancellationToken.None); + await PageRepository.DeleteAsync(id, cancellationToken: CancellationToken.None); + } + + protected virtual async Task CreatePageAsync(string title, string url, string description) + { + await CheckPageUrlAsync(url); + + return new Page(GuidGenerator.Create(), title, url, description, CurrentTenant?.Id); + } + + protected virtual async Task CheckPageUrlAsync(string url) + { + if (await PageRepository.DoesExistAsync(url)) + { + throw new UserFriendlyException("Url exist"); + } + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs index 260668e52d..ba108a605c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; using Volo.CmsKit.Contents; namespace Volo.CmsKit.Controllers.Contents diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs index 14522303c6..48a94f827a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs @@ -7,7 +7,6 @@ using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI; using Volo.Abp.AspNetCore.Mvc.UI.Widgets; -using Volo.CmsKit.Common.Application.Contracts.Volo.CmsKit.Contents; using Volo.CmsKit.Contents; using Volo.CmsKit.Web.Contents; 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 f0b5032ee7..105566c2bd 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 @@ -2,10 +2,10 @@ { public class PageConsts { - public const int MaxTitleLength = 256; + public static int MaxTitleLength = 256; - public const int MaxUrlLength = 256; + public static int MaxUrlLength = 256; - public const int MaxDescriptionLength = 515; + public static int MaxDescriptionLength = 515; } } \ No newline at end of file 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 938bbf9cd4..95c09474aa 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 @@ -1,10 +1,15 @@ using System; +using System.Threading.Tasks; using Volo.Abp.Domain.Repositories; namespace Volo.CmsKit.Pages { public interface IPageRepository : IBasicRepository { - + Task GetByUrlAsync(string url); + + Task FindByUrlAsync(string url); + + Task DoesExistAsync(string url); } } \ 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 0a4dd57cc5..c02617c8d3 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,27 +12,22 @@ namespace Volo.CmsKit.Pages public virtual string Title { get; set; } + public virtual string Url { get; set; } + public virtual string Description { get; set; } - public virtual string Url { get; set; } - protected Page() { } - public Page(Guid id, [NotNull] string title, [CanBeNull] string description, [CanBeNull] string url = null, Guid? tenantId = null) : base(id) + public Page(Guid id, [NotNull] string title, [NotNull] string url, [CanBeNull] string description, Guid? tenantId = null) : base(id) { Title = Check.NotNullOrWhiteSpace(title, nameof(title), PageConsts.MaxTitleLength); + Url = Check.NotNullOrWhiteSpace(url, nameof(url), PageConsts.MaxUrlLength); Description = Check.Length(description, nameof(description), PageConsts.MaxDescriptionLength); - SetUrl(url); TenantId = tenantId; } - - public virtual void SetUrl(string url) - { - Url = Check.Length(url, nameof(url), PageConsts.MaxUrlLength); - } } } \ No newline at end of file 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 9c3b323f45..4502a13b4c 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 @@ -1,4 +1,6 @@ using System; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.CmsKit.EntityFrameworkCore; @@ -10,5 +12,20 @@ namespace Volo.CmsKit.Pages public EfCorePageRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } + + public Task GetByUrlAsync(string url) + { + return GetAsync(x => x.Url == url); + } + + public Task FindByUrlAsync(string url) + { + return FindAsync(x => x.Url == url); + } + + public Task DoesExistAsync(string url) + { + return DbSet.AnyAsync(x => x.Url == url); + } } } \ 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 adf3d85dca..e7c6cd32f5 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,4 +1,6 @@ using System; +using System.Threading.Tasks; +using MongoDB.Driver.Linq; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Pages; @@ -10,5 +12,20 @@ namespace Volo.CmsKit.MongoDB.Pages public MongoPageRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) { } + + public Task GetByUrlAsync(string url) + { + return GetAsync(x => x.Url == url); + } + + public Task FindByUrlAsync(string url) + { + return FindAsync(x => x.Url == url); + } + + public Task DoesExistAsync(string url) + { + return GetMongoQueryable().AnyAsync(x => x.Url == url); + } } } \ No newline at end of file From f7244d1c5b96d46cea1334ca3a9b8996c23023fd Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 25 Dec 2020 14:40:51 +0300 Subject: [PATCH 32/54] namespace update --- .../host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml | 2 +- .../Shared/Components/Contents/ContentViewComponent.cs | 7 +------ .../Pages/CmsKit/Shared/Components/Contents/Default.cshtml | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml index 1bfd46cdac..b6ce055737 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml @@ -7,7 +7,7 @@ @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection -@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents +@using Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Contents @using Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Tags @model IndexModel @inject IStringLocalizer Localizer diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs index 48a94f827a..4e7cc98bd9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs @@ -1,16 +1,11 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc.UI; -using Volo.Abp.AspNetCore.Mvc.UI.Widgets; using Volo.CmsKit.Contents; using Volo.CmsKit.Web.Contents; -namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents +namespace Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Contents { [ViewComponent(Name = "CmsContent")] public class ContentViewComponent : AbpViewComponent diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml index f5bd0ba344..eb3cde67b3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml @@ -1,7 +1,6 @@ @using Microsoft.AspNetCore.Mvc.Localization @using Volo.CmsKit.Localization -@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents -@model ContentViewComponent.ContentViewModel +@model Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Contents.ContentViewComponent.ContentViewModel
@Html.Raw(Model.Rendered) From 009ba05b3465313de6f103e8189660312c596cf8 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Fri, 25 Dec 2020 14:48:29 +0300 Subject: [PATCH 33/54] tag and content features has been added. --- .../Pages/Index.cshtml | 54 ++++++++++--------- .../CmsKit/GlobalFeatures/ContentsFeature.cs | 17 ++++++ .../GlobalFeatures/GlobalCmsKitFeatures.cs | 4 ++ .../Volo/CmsKit/GlobalFeatures/TagsFeature.cs | 17 ++++++ 4 files changed, 67 insertions(+), 25 deletions(-) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml index 1bfd46cdac..95833052b7 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml @@ -16,39 +16,41 @@ - - @await Component.InvokeAsync(typeof(ContentViewComponent), new { entityType = "quote", entityId = "1" }) - - @await Component.InvokeAsync(typeof(TagViewComponent), new + @if (GlobalFeatureManager.Instance.IsEnabled()) { - entityType = "quote", - entityId = "1", - tags = new List { "a", "b" } - }) - + @await Component.InvokeAsync(typeof(ContentViewComponent), new {entityType = "quote", entityId = "1"}) + } + + @if (GlobalFeatureManager.Instance.IsEnabled()) + { + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = "quote", + entityId = "1", + tags = new List {"a", "b"} + }) + } - - @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(RatingViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "1"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new {entityType = "quote", entityId = "1"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = "1"}) } @@ -58,7 +60,7 @@

"Writing code is very simple, but writing simple code is the hardest thing there is!"

-

- Halil ibrahim Kalkan Inspired from Johan Cruyff

+

- Halil ibrahim Kalkan Inspired from Johan Cruyff

@@ -66,31 +68,33 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(RatingViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "2"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new {entityType = "quote", entityId = "2"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = "2"}) } - - @await Component.InvokeAsync(typeof(TagViewComponent), new + @if (GlobalFeatureManager.Instance.IsEnabled()) { - entityType = "IndexPage", - entityId = Guid.Empty.ToString(), - tags = new List { "a", "b" } - }) + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = "IndexPage", + entityId = Guid.Empty.ToString(), + tags = new List {"a", "b"} + }) + } - + \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs new file mode 100644 index 0000000000..6514a9c7b8 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs @@ -0,0 +1,17 @@ +using JetBrains.Annotations; +using Volo.Abp.GlobalFeatures; + +namespace Volo.CmsKit.GlobalFeatures +{ + [GlobalFeatureName(Name)] + public class ContentsFeature : GlobalFeature + { + public const string Name = "CmsKit.Contents"; + + internal ContentsFeature( + [NotNull] GlobalCmsKitFeatures cmsKit + ) : base(cmsKit) + { + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs index bb7694262b..db987784fd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs @@ -13,12 +13,16 @@ namespace Volo.CmsKit.GlobalFeatures public RatingsFeature Ratings => GetFeature(); + public TagsFeature Tags => GetFeature(); + public GlobalCmsKitFeatures([NotNull] GlobalFeatureManager featureManager) : base(featureManager) { AddFeature(new ReactionsFeature(this)); AddFeature(new CommentsFeature(this)); AddFeature(new RatingsFeature(this)); + AddFeature(new TagsFeature(this)); + AddFeature(new ContentsFeature(this)); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs new file mode 100644 index 0000000000..ff20c130fd --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs @@ -0,0 +1,17 @@ +using JetBrains.Annotations; +using Volo.Abp.GlobalFeatures; + +namespace Volo.CmsKit.GlobalFeatures +{ + [GlobalFeatureName(Name)] + public class TagsFeature : GlobalFeature + { + public const string Name = "CmsKit.Tags"; + + internal TagsFeature( + [NotNull] GlobalCmsKitFeatures cmsKit + ) : base(cmsKit) + { + } + } +} \ No newline at end of file From c1561f4e732aeb12cc957a6bbdbb10e635445f71 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 25 Dec 2020 16:04:48 +0300 Subject: [PATCH 34/54] added default page view component --- .../20201225120048_Added_Page.Designer.cs | 1647 +++++++++++++++++ .../Migrations/20201225120048_Added_Page.cs | 46 + .../UnifiedDbContextModelSnapshot.cs | 71 + .../CmsKit/CmsKitCommonRemoteServiceConsts.cs | 7 + .../Volo/CmsKit/Pages/CheckUrlInputDto.cs | 1 - .../Volo/CmsKit/Pages/CreatePageInputDto.cs | 3 - .../Pages/CreatePageWithContentInputDto.cs | 4 - .../Volo/CmsKit/Pages/IPageAppService.cs | 4 +- .../CmsKit/Pages/UpdatePageContentInputDto.cs | 1 - .../Volo/CmsKit/Pages/UpdatePageInputDto.cs | 3 - .../Volo/CmsKit/Pages/PageAppService.cs | 9 +- .../Controllers/Contents/ContentController.cs | 13 +- .../Controllers/Pages/PageController.cs | 70 + .../CmsKit/Controllers/Tags/TagController.cs | 9 +- .../Shared/Components/Pages/Default.cshtml | 21 + .../Pages/DefaultPageViewComponent.cs | 40 + 16 files changed, 1928 insertions(+), 21 deletions(-) create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/CmsKitCommonRemoteServiceConsts.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Pages/PageController.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Pages/Default.cshtml create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs 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 new file mode 100644 index 0000000000..06fcbe43a4 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs @@ -0,0 +1,1647 @@ +// +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 new file mode 100644 index 0000000000..119009c8e1 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs @@ -0,0 +1,46 @@ +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/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 49468416a0..592e827b82 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 @@ -1168,6 +1168,77 @@ namespace Volo.CmsKit.Migrations 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") diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/CmsKitCommonRemoteServiceConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/CmsKitCommonRemoteServiceConsts.cs new file mode 100644 index 0000000000..aa0412f026 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/CmsKitCommonRemoteServiceConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.CmsKit +{ + public class CmsKitCommonRemoteServiceConsts + { + public const string RemoteServiceName = "CmsKitCommon"; + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CheckUrlInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CheckUrlInputDto.cs index 6047526e03..e46dca2353 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CheckUrlInputDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CheckUrlInputDto.cs @@ -6,7 +6,6 @@ namespace Volo.CmsKit.Pages public class CheckUrlInputDto { [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] public string Url { get; set; } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageInputDto.cs index 7f5ce67260..b6ce4990f9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageInputDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageInputDto.cs @@ -6,14 +6,11 @@ namespace Volo.CmsKit.Pages public class CreatePageInputDto { [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] public string Title { get; set; } [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] public string Url { get; set; } - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] public string Description { get; set; } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageWithContentInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageWithContentInputDto.cs index ddbf7ce373..d9905b83a5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageWithContentInputDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/CreatePageWithContentInputDto.cs @@ -7,18 +7,14 @@ namespace Volo.CmsKit.Pages public class CreatePageWithContentInputDto { [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] public string Title { get; set; } [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] public string Url { get; set; } - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] public string Description { get; set; } [Required] - [DynamicMaxLength(typeof(ContentConsts), nameof(ContentConsts.MaxValueLength))] public string Content { get; set; } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs index 0b0cf7d182..f684fff57b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs @@ -5,6 +5,8 @@ namespace Volo.CmsKit.Pages { public interface IPageAppService { + Task GetAsync(Guid id); + Task CreatePageAsync(CreatePageInputDto input); Task CreatePageWithContentAsync(CreatePageWithContentInputDto input); @@ -15,6 +17,6 @@ namespace Volo.CmsKit.Pages Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input); - Task DeletePageAsync(Guid id); + Task DeleteAsync(Guid id); } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageContentInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageContentInputDto.cs index ba50ae9f30..7a1a89b955 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageContentInputDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageContentInputDto.cs @@ -7,7 +7,6 @@ namespace Volo.CmsKit.Pages public class UpdatePageContentInputDto { [Required] - [DynamicMaxLength(typeof(ContentConsts), nameof(ContentConsts.MaxValueLength))] public string Content { get; set; } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageInputDto.cs index be84b97f4f..7180d296a3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageInputDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/UpdatePageInputDto.cs @@ -6,14 +6,11 @@ namespace Volo.CmsKit.Pages public class UpdatePageInputDto { [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] public string Title { get; set; } [Required] - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] public string Url { get; set; } - [DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] public string Description { get; set; } } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs index 435be73ecd..2cc93e2988 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs @@ -17,6 +17,13 @@ namespace Volo.CmsKit.Pages ContentRepository = contentRepository; } + public virtual async Task GetAsync(Guid id) + { + var page = await PageRepository.GetAsync(id); + + return ObjectMapper.Map(page); + } + public virtual async Task CreatePageAsync(CreatePageInputDto input) { var page = await CreatePageAsync(input.Title, input.Url, input.Description); @@ -76,7 +83,7 @@ namespace Volo.CmsKit.Pages await ContentRepository.UpdateAsync(pageContent); } - public virtual async Task DeletePageAsync(Guid id) + public virtual async Task DeleteAsync(Guid id) { await ContentRepository.DeleteAsync(nameof(Page), id.ToString(), CurrentTenant?.Id, CancellationToken.None); await PageRepository.DeleteAsync(id, cancellationToken: CancellationToken.None); diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs index ba108a605c..8e9612b506 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Contents/ContentController.cs @@ -1,12 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; using Volo.CmsKit.Contents; namespace Volo.CmsKit.Controllers.Contents { + + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit/contents")] public class ContentController : CmsKitControllerBase, IContentAppService { protected readonly IContentAppService _contentAppService; @@ -16,6 +18,7 @@ namespace Volo.CmsKit.Controllers.Contents _contentAppService = contentAppService; } + [HttpGet] public virtual Task GetAsync(GetContentInput input) { return _contentAppService.GetAsync(input); diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Pages/PageController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Pages/PageController.cs new file mode 100644 index 0000000000..8c33819ac0 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Pages/PageController.cs @@ -0,0 +1,70 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.CmsKit.Pages; + +namespace Volo.CmsKit.Controllers.Pages +{ + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit/pages")] + public class PageController : CmsKitControllerBase, IPageAppService + { + protected readonly IPageAppService PageAppService; + + public PageController(IPageAppService pageAppService) + { + PageAppService = pageAppService; + } + + [HttpGet] + [Route("{id}")] + public virtual Task GetAsync(Guid id) + { + return PageAppService.GetAsync(id); + } + + [HttpPost] + [Route("create")] + public virtual Task CreatePageAsync(CreatePageInputDto input) + { + return PageAppService.CreatePageAsync(input); + } + + [HttpPost] + [Route("create-with-content")] + public virtual Task CreatePageWithContentAsync(CreatePageWithContentInputDto input) + { + return PageAppService.CreatePageWithContentAsync(input); + } + + [HttpPut] + [Route("{id}")] + public virtual Task UpdatePageAsync(Guid id, UpdatePageInputDto input) + { + return PageAppService.UpdatePageAsync(id, input); + } + + [HttpPost] + [Route("does-url-exist")] + public virtual Task DoesUrlExistAsync(CheckUrlInputDto input) + { + return PageAppService.DoesUrlExistAsync(input); + } + + [HttpPut] + [Route("update-content/{id}")] + public virtual Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input) + { + return PageAppService.UpdatePageContentAsync(id, input); + } + + [HttpDelete] + [Route("{id}")] + public virtual Task DeleteAsync(Guid id) + { + return PageAppService.DeleteAsync(id); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Tags/TagController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Tags/TagController.cs index b45d7fc6d4..89f469ef93 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Tags/TagController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Tags/TagController.cs @@ -1,10 +1,14 @@ using System.Collections.Generic; using System.Threading.Tasks; -using Volo.CmsKit.Controllers; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; using Volo.CmsKit.Tags; -namespace Volo.CmsKit.Common.HttpApi.Volo.CmsKit.Controllers.Tags +namespace Volo.CmsKit.Controllers.Tags { + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit/tags")] public class TagController : CmsKitControllerBase, ITagAppService { protected readonly ITagAppService TagAppService; @@ -14,6 +18,7 @@ namespace Volo.CmsKit.Common.HttpApi.Volo.CmsKit.Controllers.Tags TagAppService = tagAppService; } + [HttpGet] public Task> GetAllRelatedTagsAsync(GetRelatedTagsInput input) { return TagAppService.GetAllRelatedTagsAsync(input); diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Pages/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Pages/Default.cshtml new file mode 100644 index 0000000000..87a326c7ff --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Pages/Default.cshtml @@ -0,0 +1,21 @@ +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap + +@using Microsoft.AspNetCore.Mvc.RazorPages +@using Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Contents +@model Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Pages.PageViewModel + + + +

+ @Model.Title +

+
+ + +

+ @Model.Description +

+ + @await Component.InvokeAsync(typeof(ContentViewComponent), new { entityType = nameof(Page), entityId = Model.Id.ToString() }) +
+
diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs new file mode 100644 index 0000000000..62689f6bc1 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs @@ -0,0 +1,40 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Volo.CmsKit.Pages; + +namespace Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Pages +{ + [ViewComponent(Name = "CmsDefaultPage")] + public class DefaultPageViewComponent : AbpViewComponent + { + protected readonly IPageAppService PageAppService; + + public DefaultPageViewComponent(IPageAppService pageAppService) + { + PageAppService = pageAppService; + } + + public virtual async Task InvokeAsync(Guid pageId, string title, string description) + { + var model = new PageViewModel + { + Id = pageId, + Title = title, + Description = description + }; + + return View("~/Pages/CmsKit/Shared/Components/Pages/Default.cshtml", model); + } + } + + public class PageViewModel + { + public Guid Id { get; set; } + + public string Title { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file From dc0e83d74fa690c8b8a65afec2f42a3b60508564 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Fri, 25 Dec 2020 17:11:19 +0300 Subject: [PATCH 35/54] added GetAllRelatedTagsAsync implementation --- .../CmsKit/MongoDB/Tags/MongoTagRepository.cs | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) 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 ca88721460..1d5a089da4 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 @@ -1,4 +1,5 @@ using JetBrains.Annotations; +using MongoDB.Driver; using MongoDB.Driver.Linq; using System; using System.Collections.Generic; @@ -10,7 +11,7 @@ using Volo.CmsKit.Tags; namespace Volo.CmsKit.MongoDB.Tags { - public class MongoTagRepository : MongoDbRepository, ITagRepository + public class MongoTagRepository : MongoDbRepository, ITagRepository { public MongoTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) { @@ -30,7 +31,7 @@ namespace Volo.CmsKit.MongoDB.Tags cancellationToken); } - public Task GetAsync( + public Task GetAsync( [NotNull] string entityType, [NotNull] string name, Guid? tenantId, @@ -43,7 +44,7 @@ namespace Volo.CmsKit.MongoDB.Tags cancellationToken: cancellationToken); } - public Task FindAsync( + public Task FindAsync( [NotNull] string entityType, [NotNull] string name, Guid? tenantId, @@ -56,9 +57,24 @@ namespace Volo.CmsKit.MongoDB.Tags cancellationToken: cancellationToken); } - public Task> GetAllRelatedTagsAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAllRelatedTagsAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) { - throw new NotImplementedException(); + var entityTagIds = await DbContext.EntityTags.AsQueryable() + .Where(q => q.EntityId == entityId) + .Select(q => q.EntityId) + .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); + + var query = GetMongoQueryable() + .Where(x => x.EntityType == entityType && + x.TenantId == tenantId && + entityTagIds.Contains(x.Id.ToString())); + + var result = await query.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); + return result; } } } From 42616f470f14480208184b6ff40a23275cbefc3b Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Fri, 25 Dec 2020 17:32:46 +0300 Subject: [PATCH 36/54] Update modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs Co-authored-by: Enis Necipoglu --- .../Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1d5a089da4..555dad444e 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 @@ -64,7 +64,7 @@ namespace Volo.CmsKit.MongoDB.Tags CancellationToken cancellationToken = default) { var entityTagIds = await DbContext.EntityTags.AsQueryable() - .Where(q => q.EntityId == entityId) + .Where(q => q.EntityId == entityId && q.TenantId == tenantId) .Select(q => q.EntityId) .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); From 336bd90465e26f18a5e6ba32d861017af00f195e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 27 Dec 2020 21:33:15 +0300 Subject: [PATCH 37/54] Added Navigation Properties section to the module entity extensions document. --- docs/en/Module-Entity-Extensions.md | 104 ++++++++++++++++++ docs/en/Object-Extensions.md | 4 + .../extension-navigation-property-form.png | Bin 0 -> 24515 bytes .../extension-navigation-property-table.png | Bin 0 -> 39152 bytes 4 files changed, 108 insertions(+) create mode 100644 docs/en/images/extension-navigation-property-form.png create mode 100644 docs/en/images/extension-navigation-property-table.png diff --git a/docs/en/Module-Entity-Extensions.md b/docs/en/Module-Entity-Extensions.md index 042c10b815..dc23d1e663 100644 --- a/docs/en/Module-Entity-Extensions.md +++ b/docs/en/Module-Entity-Extensions.md @@ -1,5 +1,7 @@ # Module Entity Extensions +> This feature is not supported by the Blazor UI yet. + ## Introduction Module entity extension system is a **high level** extension system that allows you to **define new properties** for existing entities of the depended modules. It automatically **adds properties to the entity, database, HTTP API and the user interface** in a single point. @@ -325,6 +327,108 @@ One of the following names can be used as the localization key: Localization system searches for the key with the given order. Localized text are used on the table and the create/edit forms. +### Navigation Properties / Foreign Keys + +It is supported to add an extension property to an entity that is Id of another entity (foreign key). + +#### Example: Associate a department to a user + +````csharp +ObjectExtensionManager.Instance.Modules() + .ConfigureIdentity(identity => + { + identity.ConfigureUser(user => + { + user.AddOrUpdateProperty( + "DepartmentId", + property => + { + property.UI.Lookup.Url = "/api/departments"; + property.UI.Lookup.DisplayPropertyName = "name"; + } + ); + }); + }); +```` + +`UI.Lookup.Url` option takes a URL to get list of departments to select on edit/create forms. This endpoint can be a typical controller, an [auto API controller](API/Auto-API-Controllers.md) or any type of endpoint that returns a proper JSON response. + +An example implementation that returns a fixed list of departments (in real life, you get the list from a data source): + +````csharp +[Route("api/departments")] +public class DepartmentController : AbpController +{ + [HttpGet] + public async Task> GetAsync() + { + return new ListResultDto( + new[] + { + new DepartmentDto + { + Id = Guid.Parse("6267f0df-870f-4173-be44-d74b4b56d2bd"), + Name = "Human Resources" + }, + new DepartmentDto + { + Id = Guid.Parse("21c7b61f-330c-489e-8b8c-80e0a78a5cc5"), + Name = "Production" + } + } + ); + } +} +```` + +This API returns such a JSON response: + +````json +{ + "items": [{ + "id": "6267f0df-870f-4173-be44-d74b4b56d2bd", + "name": "Human Resources" + }, { + "id": "21c7b61f-330c-489e-8b8c-80e0a78a5cc5", + "name": "Production" + }] +} +```` + +ABP can now show an auto-complete select component to pick the department while creating or editing a user: + +![extension-navigation-property-form](images/extension-navigation-property-form.png) + +And shows the department name on the data table: + +![extension-navigation-property-form](images/extension-navigation-property-table.png) + +#### Lookup Options + +`UI.Lookup` has the following options to customize how to read the response returned from the `Url`: + +* `Url`: The endpoint to get the list of target entities. This is used on edit and create forms. +* `DisplayPropertyName`: The property in the JSON response to read the display name of the target entity to show on the UI. Default: `text`. +* `ValuePropertyName`: The property in the JSON response to read the Id of the target entity. Default: `id`. +* `FilterParamName`: ABP allows to search/filter the entity list on edit/create forms. This is especially useful if the target list contains a lot of items. In this case, you can return a limited list (top 100, for example) and allow user to search on the list. ABP sends filter text to the server (as a simple query string) with the name of this option. Default: `filter`. +* `ResultListPropertyName`: By default, returned JSON result should contain the entity list in an `items` array. You can change the name of this field. Default: `items`. + +#### Lookup Properties: How Display Name Works? + +You may wonder how ABP shows the department name on the data table above. + +It is easy to understand how to fill the dropdown on edit and create forms: ABP makes an AJAX request to the given URL. It re-requests whenever user types to filter the items. + +However, for the data table, multiple items are shown on the UI and performing a separate AJAX call to get display name of the department for each row would not be so efficient. + +Instead, the display name of the foreign entity is also saved as an extra property of the entity (see *Extra Properties* section of the [Entities](Entities.md) document) in addition to Id of the foreign entity. If you check the database, you can see the `DepartmentId_Text` in the `ExtraProperties` field in the database table: + +````json +{"DepartmentId":"21c7b61f-330c-489e-8b8c-80e0a78a5cc5","DepartmentId_Text":"Production"} +```` + +So, this is a type of *data duplication*. If your target entity's name changes in the database later, there is no automatic synchronization system. The system works as expected, but you see the old name on the data tables. If that's a problem for you, you should care yourself to update this information when display name of your entity changes. + ## Database Mapping For relational databases, all extension property values are stored in a single field in the table: diff --git a/docs/en/Object-Extensions.md b/docs/en/Object-Extensions.md index 308be4bfa7..72265b2690 100644 --- a/docs/en/Object-Extensions.md +++ b/docs/en/Object-Extensions.md @@ -410,3 +410,7 @@ ObjectExtensionManager.Instance ```` See the [Entity Framework Core Integration document](Entity-Framework-Core.md) for more. + +## See Also + +* [Module Entity Extensions](Module-Entity-Extensions.md) \ No newline at end of file diff --git a/docs/en/images/extension-navigation-property-form.png b/docs/en/images/extension-navigation-property-form.png new file mode 100644 index 0000000000000000000000000000000000000000..5e55ce3afda62249e806f1aabc0821359346d5bd GIT binary patch literal 24515 zcmdqJXH=72*Di|sD35|-MBt%o5Rev>D%}!5P(XSImENU>jtvQ2q)G3+OAVn&@0|n) z#7Hlpw?Kff@A$so`1YSO&i>9md!IA*{ev*>tTNYJbImo&H52?wRq^^YrfU=w6xWrW zLp3NU{vuFNT)go2Mc_@L*+3Bm#T^PI=o2l^DBIWw~+;0U?=$FKxu=U>sH?e;iUogG^i{<}dbb-Li~j0Ukc*WsOAU)4RX%B-&6VmJ^4gC&Kiw$*;Bq!CNQyi4f7(>h`Tbzm^@h{E z{sZfpvqUE6y46zWj7YVE!+*S^yCZdF1*Pi)OwqccqUW9g9XH}rUPv3_|GEOqHCz_u zGE!9P7xz!&UHl%qzz%x$7xH|*n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LY_iT5U=pt>Mynm^jpi zABH^il03*@ObjS-%2;u3&(XOI?tcSJ@tklO{-?Or&eWbHZ5IpZ;)m{1k6$5tw-+q!pIAm}PsZ6?W9@eC2e;ir}uTr^$DI1rUPT{hzCStiGBbfqsB^?nv zHa3QpRK(ZL{o@zp<(YN6t5>g<-3^v3x;R;jfK`D?>+3n@aGsLsyi;~pDW#K~(=*QC zC|=$vOG|47h=vMn>4>TKo~cT09S|5Y_GUpzMx_#z&&tw2_T+5sGj9Hwec?msLbzof zOE}gbW;3v)#;@rE#h|$;rJl*6%tqXMfxpogffkOtyJep-GU}69=$U44yj73<{Jg2@ zQXXrENb5+5s2hbWFE1-aYfVHYS>mX}%rbA@T4ko%ZhkuG)C&y_btt(rGjnBibrosD zzQHma*ml8U1^>)*?mzNjs?H{{T4jj)G*egjGWdA$w|3Adc f|3G7XRr~`k$}`$!$X15on;TahfmN4(`}4m5IvMe~ literal 0 HcmV?d00001 diff --git a/docs/en/images/extension-navigation-property-table.png b/docs/en/images/extension-navigation-property-table.png new file mode 100644 index 0000000000000000000000000000000000000000..a3f333919cf6c662a00c7769bc7e4502b8280fdb GIT binary patch literal 39152 zcmeFYXH*kfw>HY&ZuGUmMnwb!wxFWYRGO54Y!L*cNv{#$Pf7ICqSDe%v+kBV%Qixz?I%&SySr=B<%| z_SsVcr#Lt`&gwkUe8RzT;w=Zq?~?!eon7-(_FwKC9Di}>Xlj@SWvt?$K}p-G>IW(p z&iM$O;&m|!IJItZ_OY|ObJ4>YUX6!78n(B_FRoU5k2PN5Exu7>oj+bwf5FG0va0^Y z>8L78tJOb!v~rpsEnOI;UNuj<_xGzFD&p$AQ}{m%CqH0G8?!zBS!A_4gW|-dO(l9l zZGN5{TL`uQ8vO$3qi-B(mnVPK=_KeMJFI#q_usXmdNDR+&uh9?-ut&B+4YUAt*z%S ze*f2GwW`2j%}3w-#p>926Y&&%i|D*-qerb`k&;RHtnusoPs9`TL2&QsS}zGHDO}a= z$egwup z8_Icza_OhxC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cs | 1643 +++++++++++++++++ ...1228083120_Updated_Tag_Removed_HexColor.cs | 24 + .../UnifiedDbContextModelSnapshot.cs | 4 - .../Volo/CmsKit/Tags/TagDto.cs | 2 - .../Shared/Components/Tags/Default.cshtml | 2 +- .../CmsKit/Shared/Components/Tags/default.css | 4 - .../Volo.CmsKit.Common.Web.csproj | 4 - .../Volo/CmsKit/Tags/TagConsts.cs | 2 - .../Volo/CmsKit/Tags/ITagManager.cs | 3 - .../Volo/CmsKit/Tags/Tag.cs | 9 - .../Volo/CmsKit/Tags/TagManager.cs | 7 +- .../CmsKitDbContextModelCreatingExtensions.cs | 1 - 12 files changed, 1669 insertions(+), 36 deletions(-) create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/default.css 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 new file mode 100644 index 0000000000..8f90204baa --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs @@ -0,0 +1,1643 @@ +// +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 new file mode 100644 index 0000000000..476f4ea87e --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs @@ -0,0 +1,24 @@ +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/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 592e827b82..37622217c5 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 @@ -1374,10 +1374,6 @@ namespace Volo.CmsKit.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("HexColor") - .HasMaxLength(6) - .HasColumnType("nvarchar(6)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs index 4b9e4a5897..e7d41e6657 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs @@ -8,7 +8,5 @@ namespace Volo.CmsKit.Tags public string EntityType { get; set; } public string Name { get; protected set; } - - public string HexColor { get; protected set; } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml index e0e9a034a3..f1dd2008ac 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml @@ -6,7 +6,7 @@ { foreach (var tag in Model.Tags) { - + @tag.Name } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/default.css b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/default.css deleted file mode 100644 index e3f6d69107..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/default.css +++ /dev/null @@ -1,4 +0,0 @@ -.cmskit-tag { - border-radius: 2px; - border: 1px solid; -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj index 132e584fc0..620274f4f3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj @@ -35,8 +35,4 @@ - - - - diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs index 5affee9c15..4e6c0b38cc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs @@ -7,7 +7,5 @@ namespace Volo.CmsKit.Tags public static int MaxEntityTypeLength { get; set; } = CmsEntityConsts.MaxEntityTypeLength; public static int MaxNameLength { get; set; } = 32; - - public static int MaxColorHexLength { get; set; } = 6; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs index b1562a341d..18fea113c0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs @@ -12,20 +12,17 @@ namespace Volo.CmsKit.Tags Task InsertAsync( [NotNull] string entityType, [NotNull] string name, - [CanBeNull] string hexColor, Guid? tenantId = null, CancellationToken cancellationToken = default); Task UpdateAsync( Guid id, [NotNull] string name, - [CanBeNull] string hexColor, CancellationToken cancellationToken = default); Task GetOrAddAsync( [NotNull] string entityType, [NotNull] string name, - [CanBeNull] string hexColor = null, Guid? tenantId = null, CancellationToken cancellationToken = default); } 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 a13ea70ba0..9920fa5a3e 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 @@ -12,8 +12,6 @@ namespace Volo.CmsKit.Tags public string Name { get; protected set; } - public string HexColor { get; protected set; } - public Guid? TenantId { get; } protected Tag() @@ -23,12 +21,10 @@ namespace Volo.CmsKit.Tags public Tag( [NotNull] string entityType, [NotNull] string name, - [CanBeNull] string hexColor, Guid? tenantId = null) { EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); SetName(name); - SetHexColor(hexColor); TenantId = tenantId; } @@ -36,10 +32,5 @@ namespace Volo.CmsKit.Tags { Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); } - - public void SetHexColor(string hexColor) - { - HexColor = Check.Length(hexColor, nameof(hexColor), TagConsts.MaxColorHexLength); - } } } 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 c62317cd64..f669298441 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 @@ -19,7 +19,6 @@ namespace Volo.CmsKit.Tags public async Task GetOrAddAsync( [NotNull] string entityType, [NotNull] string name, - [CanBeNull] string hexColor = null, Guid? tenantId = null, CancellationToken cancellationToken = default) { @@ -27,7 +26,7 @@ namespace Volo.CmsKit.Tags if (entity == null) { - entity = await InsertAsync(entityType, name, hexColor, tenantId, cancellationToken); + entity = await InsertAsync(entityType, name, tenantId, cancellationToken); } return entity; @@ -36,7 +35,6 @@ namespace Volo.CmsKit.Tags public async Task InsertAsync( [NotNull] string entityType, [NotNull] string name, - [CanBeNull] string hexColor, Guid? tenantId = null, CancellationToken cancellationToken = default) { @@ -49,7 +47,6 @@ namespace Volo.CmsKit.Tags new Tag( entityType, name, - hexColor, tenantId), cancellationToken: cancellationToken); } @@ -57,13 +54,11 @@ namespace Volo.CmsKit.Tags public async Task UpdateAsync( Guid id, [NotNull] string name, - [CanBeNull] string hexColor, CancellationToken cancellationToken = default) { var entity = await _tagRepository.GetAsync(id, cancellationToken: cancellationToken); entity.SetName(name); - entity.SetHexColor(hexColor); if (await _tagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken)) { 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 200401e4c2..8d32de7958 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 @@ -118,7 +118,6 @@ namespace Volo.CmsKit.EntityFrameworkCore b.Property(x => x.EntityType).IsRequired().HasMaxLength(TagConsts.MaxEntityTypeLength); b.Property(x => x.Name).IsRequired().HasMaxLength(TagConsts.MaxNameLength); - b.Property(x => x.HexColor).HasMaxLength(TagConsts.MaxColorHexLength); b.HasIndex(x => new { x.TenantId, x.Name }); }); From 49f3b6a8f4929a11c03f547fb3a340e76ab64fb7 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 28 Dec 2020 11:35:05 +0300 Subject: [PATCH 39/54] Remove static tags logic --- .../Pages/Index.cshtml | 6 ++-- .../Volo/CmsKit/Tags/GetRelatedTagsInput.cs | 2 -- .../Volo/CmsKit/Tags/TagAppService.cs | 28 ++----------------- .../Components/Tags/TagViewComponent.cs | 6 ++-- 4 files changed, 6 insertions(+), 36 deletions(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml index b6ce055737..453ef5619e 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml @@ -22,8 +22,7 @@ @await Component.InvokeAsync(typeof(TagViewComponent), new { entityType = "quote", - entityId = "1", - tags = new List { "a", "b" } + entityId = "1" }) @@ -89,8 +88,7 @@ @await Component.InvokeAsync(typeof(TagViewComponent), new { entityType = "IndexPage", - entityId = Guid.Empty.ToString(), - tags = new List { "a", "b" } + entityId = Guid.Empty.ToString() }) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/GetRelatedTagsInput.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/GetRelatedTagsInput.cs index 0019bbd661..ca9cd31b16 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/GetRelatedTagsInput.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/GetRelatedTagsInput.cs @@ -10,7 +10,5 @@ namespace Volo.CmsKit.Tags [Required] public string EntityId { get; set; } - - public List Tags { get; set; } } } 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 c9ddef9629..4e096d9bf6 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 @@ -13,7 +13,8 @@ namespace Volo.CmsKit.Tags public TagAppService( ITagManager tagManager, - ITagRepository tagRepository, IEntityTagRepository entityTagRepository) + ITagRepository tagRepository, + IEntityTagRepository entityTagRepository) { TagManager = tagManager; TagRepository = tagRepository; @@ -27,31 +28,6 @@ namespace Volo.CmsKit.Tags input.EntityId, CurrentTenant.Id); - if (input.Tags?.Count > 0) - { - var nonExisting = input.Tags - .Where(x => - !entities.Any(a => - a.Name.Equals(x.Trim(), - StringComparison.InvariantCultureIgnoreCase))); - - foreach (var tag in nonExisting) - { - var insertedTag = await TagManager.GetOrAddAsync( - input.EntityType, - tag, - tenantId: CurrentTenant?.Id); - - await EntityTagRepository.InsertAsync( - new EntityTag( - insertedTag.Id, - input.EntityId, - CurrentTenant?.Id)); - - entities.Add(insertedTag); - } - } - return ObjectMapper.Map, List>(entities); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs index 83ad0e7e3a..9e787c4d4c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs @@ -21,14 +21,12 @@ namespace Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Tags public virtual async Task InvokeAsync( string entityType, - string entityId, - IEnumerable tags = null) + string entityId) { var tagDtos = await TagAppService.GetAllRelatedTagsAsync(new GetRelatedTagsInput { EntityId = entityId, - EntityType = entityType, - Tags = tags?.ToList() + EntityType = entityType }); var viewModel = new TagViewModel From dd95488cb0a50d30637168e3154a485f70715054 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 28 Dec 2020 11:52:21 +0300 Subject: [PATCH 40/54] CmsKit - EfCore Tag Query Update - Convert Join query to seperated queries --- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) 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 5bbecd3629..ea3b3c5bf9 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 @@ -64,20 +64,17 @@ namespace Volo.CmsKit.Tags Guid? tenantId = null, CancellationToken cancellationToken = default) { + var entityTagIds = await DbContext.Set() + .Where(q => q.EntityId == entityId && q.TenantId == tenantId) + .Select(q => q.EntityId) + .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); - var query = DbContext.Set() - .Where(x => - x.EntityId == entityId && - x.TenantId == tenantId - ) - .Join( - DbSet, - o => o.TagId, - i => i.Id, - (entityTag, tag) => tag) - .Where(x => x.EntityType == entityType); + var query = DbSet + .Where(x => x.EntityType == entityType && + x.TenantId == tenantId && + entityTagIds.Contains(x.Id.ToString())); - return await query.ToListAsync(); + return await query.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); } } } From 2cf68eed2ec4e1f4ca33b120d852e432c485df9a Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 12:45:22 +0300 Subject: [PATCH 41/54] Added CmsKit Page --- .../Volo/CmsKit/Pages/IPageAppService.cs | 3 +++ .../Volo/CmsKit/Pages/PageAppService.cs | 7 +++++ .../Controllers/Pages/PageController.cs | 7 +++++ .../Pages/CmsKit/Pages/Index.cshtml | 15 +++++++++++ .../Pages/CmsKit/Pages/Index.cshtml.cs | 26 +++++++++++++++++++ .../Pages/CmsKit/_ViewImports.cshtml | 4 +++ .../Pages/CommonPageModel.cs | 13 ++++++++++ 7 files changed, 75 insertions(+) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Pages/Index.cshtml create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Pages/Index.cshtml.cs create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/_ViewImports.cshtml create mode 100644 modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CommonPageModel.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs index f684fff57b..ef9c8082df 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Pages/IPageAppService.cs @@ -1,11 +1,14 @@ using System; using System.Threading.Tasks; +using JetBrains.Annotations; namespace Volo.CmsKit.Pages { public interface IPageAppService { Task GetAsync(Guid id); + + Task GetByUrlAsync([NotNull] string url); Task CreatePageAsync(CreatePageInputDto input); diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs index 2cc93e2988..cc7c177873 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Pages/PageAppService.cs @@ -24,6 +24,13 @@ namespace Volo.CmsKit.Pages return ObjectMapper.Map(page); } + public virtual async Task GetByUrlAsync(string url) + { + var page = await PageRepository.GetByUrlAsync(url); + + return ObjectMapper.Map(page); + } + public virtual async Task CreatePageAsync(CreatePageInputDto input) { var page = await CreatePageAsync(input.Title, input.Url, input.Description); diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Pages/PageController.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Pages/PageController.cs index 8c33819ac0..d16dc97ef1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Pages/PageController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi/Volo/CmsKit/Controllers/Pages/PageController.cs @@ -25,6 +25,13 @@ namespace Volo.CmsKit.Controllers.Pages return PageAppService.GetAsync(id); } + [HttpGet] + [Route("url/{url}")] + public Task GetByUrlAsync(string url) + { + return PageAppService.GetByUrlAsync(url); + } + [HttpPost] [Route("create")] public virtual Task CreatePageAsync(CreatePageInputDto input) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Pages/Index.cshtml new file mode 100644 index 0000000000..486b1c78c1 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Pages/Index.cshtml @@ -0,0 +1,15 @@ +@page "{pageUrl}" +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.CmsKit.Localization +@using Volo.CmsKit.Web.Pages.CmsKit.Pages +@using Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.Pages +@model IndexModel +@inject IHtmlLocalizer L + +@await Component.InvokeAsync(typeof(DefaultPageViewComponent), + new + { + pageId = Model.Page.Id, + title = Model.Page.Title, + description = Model.Page.Description + }) \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Pages/Index.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Pages/Index.cshtml.cs new file mode 100644 index 0000000000..f0ecfbc9c2 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Pages/Index.cshtml.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.CmsKit.Pages; + +namespace Volo.CmsKit.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.GetByUrlAsync(PageUrl); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/_ViewImports.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/_ViewImports.cshtml new file mode 100644 index 0000000000..c1da1f5f10 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CommonPageModel.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CommonPageModel.cs new file mode 100644 index 0000000000..1148bb0436 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CommonPageModel.cs @@ -0,0 +1,13 @@ +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; +using Volo.CmsKit.Localization; + +namespace Volo.CmsKit.Web.Pages +{ + public abstract class CommonPageModel : AbpPageModel + { + protected CommonPageModel() + { + LocalizationResourceType = typeof(CmsKitResource); + } + } +} \ No newline at end of file From 8845c81a6da9091728ea68d03c01e740918d5b35 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 13:47:57 +0300 Subject: [PATCH 42/54] Created content-test-data --- .../CmsKitDataSeedContributor.cs | 29 +++++++++++++++++-- .../Volo.CmsKit.TestBase/CmsKitTestData.cs | 12 ++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs index 2237ecc064..088056dc05 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs @@ -5,6 +5,7 @@ using Volo.Abp.Guids; using Volo.Abp.MultiTenancy; using Volo.Abp.Users; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; using Volo.CmsKit.Users; @@ -20,7 +21,7 @@ namespace Volo.CmsKit private readonly ReactionManager _reactionManager; private readonly IRatingRepository _ratingRepository; private readonly ICurrentTenant _currentTenant; - + private readonly IContentRepository _contentRepository; public CmsKitDataSeedContributor( IGuidGenerator guidGenerator, ICmsUserRepository cmsUserRepository, @@ -28,7 +29,8 @@ namespace Volo.CmsKit ICommentRepository commentRepository, ReactionManager reactionManager, IRatingRepository ratingRepository, - ICurrentTenant currentTenant) + ICurrentTenant currentTenant, + IContentRepository contentRepository) { _guidGenerator = guidGenerator; _cmsUserRepository = cmsUserRepository; @@ -37,6 +39,7 @@ namespace Volo.CmsKit _reactionManager = reactionManager; _ratingRepository = ratingRepository; _currentTenant = currentTenant; + _contentRepository = contentRepository; } public async Task SeedAsync(DataSeedContext context) @@ -50,6 +53,8 @@ namespace Volo.CmsKit await SeedReactionsAsync(); await SeedRatingsAsync(); + + await SeedContentsAsync(); } } @@ -177,5 +182,25 @@ namespace Volo.CmsKit _cmsKitTestData.User2Id )); } + + private async Task SeedContentsAsync() + { + var content1 = new Content( + _guidGenerator.Create(), + _cmsKitTestData.Content_1_EntityType, + _cmsKitTestData.Content_1_Id, + _cmsKitTestData.Content_1 + ); + + var content2 = new Content( + _guidGenerator.Create(), + _cmsKitTestData.Content_2_EntityType, + _cmsKitTestData.Content_2_Id, + _cmsKitTestData.Content_2 + ); + + await _contentRepository.InsertAsync(content1); + await _contentRepository.InsertAsync(content2); + } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs index 4e1472a3d8..0477711cd3 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs @@ -18,5 +18,17 @@ namespace Volo.CmsKit public string EntityId1 { get; } = "1"; public string EntityId2 { get; } = "2"; + + public string Content_1_EntityType = "Lyrics"; + + public string Content_1 { get; } = "First things first\nI'ma say all the words inside my head\nI'm fired up and tired of the way that things have been, oh-ooh\nThe way that things have been, oh-ooh"; + + public string Content_1_Id = "1"; + + public string Content_2_EntityType = "LyricsAlso"; + + public string Content_2 { get; } = "Second thing second\nDon't you tell me what you think that I could be\nI'm the one at the sail, I'm the master of my sea, oh-ooh\nThe master of my sea, oh-ooh"; + + public string Content_2_Id = "2"; } } From 055a7a91c863213250f6d6d5ab4988105002196f Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 15:12:29 +0300 Subject: [PATCH 43/54] Added content repository tests --- .../Contents/ContentRepository_Test.cs | 9 +++ .../Contents/ContentRepository_Test.cs | 11 ++++ .../Contents/ContentRepository_Tests.cs | 64 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Contents/ContentRepository_Test.cs create mode 100644 modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Contents/ContentRepository_Test.cs create mode 100644 modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs diff --git a/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Contents/ContentRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Contents/ContentRepository_Test.cs new file mode 100644 index 0000000000..72f0b47485 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Contents/ContentRepository_Test.cs @@ -0,0 +1,9 @@ +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.EntityFrameworkCore.Contents +{ + public class ContentRepository_Test : ContentRepository_Tests + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Contents/ContentRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Contents/ContentRepository_Test.cs new file mode 100644 index 0000000000..bb467a4844 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Contents/ContentRepository_Test.cs @@ -0,0 +1,11 @@ +using Volo.CmsKit.Contents; +using Xunit; + +namespace Volo.CmsKit.MongoDB.Contents +{ + [Collection(MongoTestCollection.Name)] + public class ContentRepository_Test : ContentRepository_Tests + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs new file mode 100644 index 0000000000..6cec5786e2 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs @@ -0,0 +1,64 @@ +using System; +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; +using Xunit; + +namespace Volo.CmsKit.Contents +{ + public abstract class ContentRepository_Tests : CmsKitTestBase + where TStartupModule : IAbpModule + { + private readonly CmsKitTestData _cmsKitTestData; + private readonly IContentRepository _contentRepository; + + public ContentRepository_Tests() + { + _cmsKitTestData = GetRequiredService(); + _contentRepository = GetRequiredService(); + } + + [Theory] + [InlineData("Lyrics", "1", "First things first")] + [InlineData("LyricsAlso", "2", "Second thing second")] + public async Task ShouldGetAsync(string entityType, string entityId, string contentStartsWith = null) + { + var content = await _contentRepository.GetAsync(entityType, entityId); + + content.ShouldNotBeNull(); + + if (contentStartsWith != null) + { + content.Value.ShouldStartWith(contentStartsWith); + } + } + + [Fact] + public async Task ShouldNotGetAsync() + { + Should.Throw( + async () + => + await _contentRepository.GetAsync("not_exist_entity", Guid.NewGuid().ToString())); + } + + [Fact] + public async Task ShouldFindAsync() + { + var content = + await _contentRepository.FindAsync(_cmsKitTestData.Content_1_EntityType, _cmsKitTestData.Content_1_Id); + + content.ShouldNotBeNull(); + } + + [Fact] + public async Task ShouldNotFindAsync() + { + var content = await _contentRepository.FindAsync("not_exist_entity", Guid.NewGuid().ToString()); + + content.ShouldBeNull(); + } + } +} \ No newline at end of file From dfe9ea40dd398dea89098005dc5c5248f5590f5f Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 15:24:40 +0300 Subject: [PATCH 44/54] added id parameter to tag constructor --- .../src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs | 1 + .../cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs | 3 ++- .../src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs index 18fea113c0..943fd6af00 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs @@ -10,6 +10,7 @@ namespace Volo.CmsKit.Tags public interface ITagManager : IDomainService { Task InsertAsync( + Guid id, [NotNull] string entityType, [NotNull] string name, Guid? tenantId = null, 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 9920fa5a3e..09d9fe6c3c 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 @@ -19,9 +19,10 @@ namespace Volo.CmsKit.Tags } public Tag( + Guid id, [NotNull] string entityType, [NotNull] string name, - Guid? tenantId = null) + Guid? tenantId = null) : base(id) { EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); SetName(name); 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 f669298441..bc450ebf7b 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 @@ -26,13 +26,14 @@ namespace Volo.CmsKit.Tags if (entity == null) { - entity = await InsertAsync(entityType, name, tenantId, cancellationToken); + entity = await InsertAsync(GuidGenerator.Create(), entityType, name, tenantId, cancellationToken); } return entity; } public async Task InsertAsync( + Guid id, [NotNull] string entityType, [NotNull] string name, Guid? tenantId = null, @@ -45,6 +46,7 @@ namespace Volo.CmsKit.Tags return await _tagRepository.InsertAsync( new Tag( + id, entityType, name, tenantId), From c84aaf1e7b84eba75e25a34816551c4e3d7ec90e Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 15:41:24 +0300 Subject: [PATCH 45/54] created tag test data and fix some bugs --- .../Volo/CmsKit/Contents/Content.cs | 2 +- .../Volo/CmsKit/Pages/Page.cs | 2 +- .../Volo/CmsKit/Tags/EntityTag.cs | 2 +- .../Volo/CmsKit/Tags/Tag.cs | 2 +- .../Tags/TagRepository_Test.cs | 9 ++++++ .../MongoDB/Tags/TagRepository_Test.cs | 11 +++++++ .../CmsKitDataSeedContributor.cs | 32 +++++++++++++++++-- .../Volo.CmsKit.TestBase/CmsKitTestData.cs | 5 +++ .../Contents/ContentRepository_Tests.cs | 3 +- .../Tags/TagRepository_Test.cs | 17 ++++++++++ 10 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepository_Test.cs create mode 100644 modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Tags/TagRepository_Test.cs create mode 100644 modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs 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 354041b51b..6f4175daad 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,7 +8,7 @@ namespace Volo.CmsKit.Contents { public class Content : FullAuditedAggregateRoot, IMultiTenant { - public virtual Guid? TenantId { get; } + public virtual Guid? TenantId { get; set; } public virtual string EntityType { get; set; } 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 c02617c8d3..16ec7df3a5 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 { - public Guid? TenantId { get; } + public Guid? TenantId { get; set; } public virtual string Title { get; set; } 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 e69dbf53aa..5d27e8b15f 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 @@ -10,7 +10,7 @@ namespace Volo.CmsKit.Tags public virtual string EntityId { get; set; } - public virtual Guid? TenantId { get; } + public virtual Guid? TenantId { get; set; } protected EntityTag() { 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 09d9fe6c3c..fab09ed521 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 @@ -12,7 +12,7 @@ namespace Volo.CmsKit.Tags public string Name { get; protected set; } - public Guid? TenantId { get; } + public Guid? TenantId { get; set; } protected Tag() { diff --git a/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepository_Test.cs new file mode 100644 index 0000000000..205379e2b3 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepository_Test.cs @@ -0,0 +1,9 @@ +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.EntityFrameworkCore.Tags +{ + public class TagRepository_Test : TagRepository_Test + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Tags/TagRepository_Test.cs new file mode 100644 index 0000000000..1c2f063989 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Tags/TagRepository_Test.cs @@ -0,0 +1,11 @@ +using Volo.CmsKit.Tags; +using Xunit; + +namespace Volo.CmsKit.MongoDB.Tags +{ + [Collection(MongoTestCollection.Name)] + public class TagRepository_Test : TagRepository_Test + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs index 088056dc05..a33253406e 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System.Linq; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; @@ -8,6 +9,7 @@ using Volo.CmsKit.Comments; using Volo.CmsKit.Contents; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; namespace Volo.CmsKit @@ -22,6 +24,8 @@ namespace Volo.CmsKit private readonly IRatingRepository _ratingRepository; private readonly ICurrentTenant _currentTenant; private readonly IContentRepository _contentRepository; + private readonly ITagRepository _tagRepository; + public CmsKitDataSeedContributor( IGuidGenerator guidGenerator, ICmsUserRepository cmsUserRepository, @@ -30,7 +34,8 @@ namespace Volo.CmsKit ReactionManager reactionManager, IRatingRepository ratingRepository, ICurrentTenant currentTenant, - IContentRepository contentRepository) + IContentRepository contentRepository, + ITagRepository tagRepository) { _guidGenerator = guidGenerator; _cmsUserRepository = cmsUserRepository; @@ -40,6 +45,7 @@ namespace Volo.CmsKit _ratingRepository = ratingRepository; _currentTenant = currentTenant; _contentRepository = contentRepository; + _tagRepository = tagRepository; } public async Task SeedAsync(DataSeedContext context) @@ -55,6 +61,8 @@ namespace Volo.CmsKit await SeedRatingsAsync(); await SeedContentsAsync(); + + await SeedTagsAsync(); } } @@ -202,5 +210,25 @@ namespace Volo.CmsKit await _contentRepository.InsertAsync(content1); await _contentRepository.InsertAsync(content2); } + + private async Task SeedTagsAsync() + { + var content_1_tags = + _cmsKitTestData.Content_1_Tags + .Select(x => + new Tag(_guidGenerator.Create(), _cmsKitTestData.Content_1_EntityType, x)).ToList(); + + var content_2_tags = + _cmsKitTestData.Content_2_Tags + .Select(x => + new Tag(_guidGenerator.Create(), _cmsKitTestData.Content_2_EntityType, x)).ToList(); + + content_1_tags.AddRange(content_2_tags); + + foreach (var tag in content_1_tags) + { + await _tagRepository.InsertAsync(tag); + } + } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs index 0477711cd3..6589e79d9c 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs @@ -1,4 +1,5 @@ using System; +using JetBrains.Annotations; using Volo.Abp.DependencyInjection; namespace Volo.CmsKit @@ -24,11 +25,15 @@ namespace Volo.CmsKit public string Content_1 { get; } = "First things first\nI'ma say all the words inside my head\nI'm fired up and tired of the way that things have been, oh-ooh\nThe way that things have been, oh-ooh"; public string Content_1_Id = "1"; + + public string[] Content_1_Tags => new string[] {"Imagine Dragons", "Music"}; public string Content_2_EntityType = "LyricsAlso"; public string Content_2 { get; } = "Second thing second\nDon't you tell me what you think that I could be\nI'm the one at the sail, I'm the master of my sea, oh-ooh\nThe master of my sea, oh-ooh"; public string Content_2_Id = "2"; + + public string[] Content_2_Tags => new string[] {"Imagine Dragons", "Music", "Most Loved Part"}; } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs index 6cec5786e2..c92383694e 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using Shouldly; using Volo.Abp.Domain.Entities; using Volo.Abp.Modularity; -using Volo.Abp.Uow; using Xunit; namespace Volo.CmsKit.Contents @@ -14,7 +13,7 @@ namespace Volo.CmsKit.Contents private readonly CmsKitTestData _cmsKitTestData; private readonly IContentRepository _contentRepository; - public ContentRepository_Tests() + protected ContentRepository_Tests() { _cmsKitTestData = GetRequiredService(); _contentRepository = GetRequiredService(); diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs new file mode 100644 index 0000000000..2843c864ef --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs @@ -0,0 +1,17 @@ +using Volo.Abp.Modularity; + +namespace Volo.CmsKit.Tags +{ + public abstract class TagRepository_Test : CmsKitTestBase + where TStartupModule : IAbpModule + { + private readonly CmsKitTestData _cmsKitTestData; + private readonly ITagRepository _tagRepository; + + protected TagRepository_Test() + { + _cmsKitTestData = GetRequiredService(); + _tagRepository = GetRequiredService(); + } + } +} \ No newline at end of file From 4e355428899fbd8abc7658f0eeba71225877336d Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 15:49:51 +0300 Subject: [PATCH 46/54] fix TagRepository --- .../Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs | 2 +- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 6 +++--- .../Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs index c33c577422..b6de5631d4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs @@ -12,7 +12,7 @@ namespace Volo.CmsKit.Tags Task GetAsync( [NotNull] string entityType, [NotNull] string name, - Guid? tenantId, + Guid? tenantId = null, CancellationToken cancellationToken = default); Task AnyAsync( 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 5bbecd3629..da5eb4bb2a 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 @@ -22,7 +22,7 @@ namespace Volo.CmsKit.Tags public virtual Task AnyAsync( [NotNull] string entityType, [NotNull] string name, - Guid? tenantId, + Guid? tenantId = null, CancellationToken cancellationToken = default) { return DbSet.AnyAsync(x => @@ -35,7 +35,7 @@ namespace Volo.CmsKit.Tags public virtual Task GetAsync( [NotNull] string entityType, [NotNull] string name, - Guid? tenantId, + Guid? tenantId = null, CancellationToken cancellationToken = default) { return GetAsync(x => @@ -48,7 +48,7 @@ namespace Volo.CmsKit.Tags public virtual Task FindAsync( [NotNull] string entityType, [NotNull] string name, - Guid? tenantId, + Guid? tenantId = null, CancellationToken cancellationToken = default) { return FindAsync(x => 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 555dad444e..6844c9a064 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 @@ -20,7 +20,7 @@ namespace Volo.CmsKit.MongoDB.Tags public Task AnyAsync( [NotNull] string entityType, [NotNull] string name, - Guid? tenantId, + Guid? tenantId = null, CancellationToken cancellationToken = default) { return GetMongoQueryable() @@ -34,7 +34,7 @@ namespace Volo.CmsKit.MongoDB.Tags public Task GetAsync( [NotNull] string entityType, [NotNull] string name, - Guid? tenantId, + Guid? tenantId = null, CancellationToken cancellationToken = default) { return GetAsync(x => @@ -47,7 +47,7 @@ namespace Volo.CmsKit.MongoDB.Tags public Task FindAsync( [NotNull] string entityType, [NotNull] string name, - Guid? tenantId, + Guid? tenantId = null, CancellationToken cancellationToken = default) { return FindAsync(x => From 7dc1bdbe137220a71cc72674a5a5b2b077309894 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 15:59:00 +0300 Subject: [PATCH 47/54] Update ITagRepository.cs --- .../src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs index b6de5631d4..8493fe8401 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs @@ -24,7 +24,7 @@ namespace Volo.CmsKit.Tags Task FindAsync( [NotNull] string entityType, [NotNull] string name, - Guid? tenantId, + Guid? tenantId = null, CancellationToken cancellationToken = default); Task> GetAllRelatedTagsAsync( From 6cc5cd4bd9b7dc200d47e3b5ffa9f0e57948c92f Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 16:21:25 +0300 Subject: [PATCH 48/54] Added Tag tests --- .../CmsKitDataSeedContributor.cs | 36 +++--- .../Tags/TagRepository_Test.cs | 103 +++++++++++++++++- 2 files changed, 119 insertions(+), 20 deletions(-) diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs index a33253406e..8a1ab616d1 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs @@ -24,8 +24,9 @@ namespace Volo.CmsKit private readonly IRatingRepository _ratingRepository; private readonly ICurrentTenant _currentTenant; private readonly IContentRepository _contentRepository; - private readonly ITagRepository _tagRepository; - + private readonly IEntityTagRepository _entityTagRepository; + private readonly ITagManager _tagManager; + public CmsKitDataSeedContributor( IGuidGenerator guidGenerator, ICmsUserRepository cmsUserRepository, @@ -34,8 +35,9 @@ namespace Volo.CmsKit ReactionManager reactionManager, IRatingRepository ratingRepository, ICurrentTenant currentTenant, - IContentRepository contentRepository, - ITagRepository tagRepository) + IContentRepository contentRepository, + ITagManager tagManager, + IEntityTagRepository entityTagRepository) { _guidGenerator = guidGenerator; _cmsUserRepository = cmsUserRepository; @@ -45,7 +47,8 @@ namespace Volo.CmsKit _ratingRepository = ratingRepository; _currentTenant = currentTenant; _contentRepository = contentRepository; - _tagRepository = tagRepository; + _tagManager = tagManager; + _entityTagRepository = entityTagRepository; } public async Task SeedAsync(DataSeedContext context) @@ -213,21 +216,18 @@ namespace Volo.CmsKit private async Task SeedTagsAsync() { - var content_1_tags = - _cmsKitTestData.Content_1_Tags - .Select(x => - new Tag(_guidGenerator.Create(), _cmsKitTestData.Content_1_EntityType, x)).ToList(); - - var content_2_tags = - _cmsKitTestData.Content_2_Tags - .Select(x => - new Tag(_guidGenerator.Create(), _cmsKitTestData.Content_2_EntityType, x)).ToList(); - - content_1_tags.AddRange(content_2_tags); + foreach (var tag in _cmsKitTestData.Content_1_Tags) + { + var tagEntity = await _tagManager.InsertAsync(_guidGenerator.Create(), _cmsKitTestData.Content_1_EntityType, tag); - foreach (var tag in content_1_tags) + await _entityTagRepository.InsertAsync(new EntityTag(tagEntity.Id, _cmsKitTestData.Content_1_Id)); + } + + foreach (var tag in _cmsKitTestData.Content_2_Tags) { - await _tagRepository.InsertAsync(tag); + var tagEntity = await _tagManager.InsertAsync(_guidGenerator.Create(), _cmsKitTestData.Content_2_EntityType, tag); + + await _entityTagRepository.InsertAsync(new EntityTag(tagEntity.Id, _cmsKitTestData.Content_2_Id)); } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs index 2843c864ef..4a7070a20a 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs @@ -1,4 +1,10 @@ -using Volo.Abp.Modularity; +using System; +using System.Linq; +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Modularity; +using Xunit; namespace Volo.CmsKit.Tags { @@ -7,11 +13,104 @@ namespace Volo.CmsKit.Tags { private readonly CmsKitTestData _cmsKitTestData; private readonly ITagRepository _tagRepository; - + protected TagRepository_Test() { _cmsKitTestData = GetRequiredService(); _tagRepository = GetRequiredService(); } + + [Theory] + [InlineData("Lyrics", "Imagine Dragons")] + [InlineData("Lyrics", "Music")] + [InlineData("LyricsAlso", "Imagine Dragons")] + [InlineData("LyricsAlso", "Music")] + [InlineData("LyricsAlso", "Most Loved Part")] + public async Task ShouldGetAsync(string entityType, string name) + { + var tag = await _tagRepository.GetAsync(entityType, name); + + tag.ShouldNotBeNull(); + } + + [Fact] + public async Task ShouldNotGetAsync() + { + Should.Throw( + async () => await _tagRepository.GetAsync("not_exist_entity", Guid.NewGuid().ToString()) + ); + } + + [Theory] + [InlineData("Lyrics", "Imagine Dragons")] + [InlineData("Lyrics", "Music")] + [InlineData("LyricsAlso", "Imagine Dragons")] + [InlineData("LyricsAlso", "Music")] + [InlineData("LyricsAlso", "Most Loved Part")] + public async Task ShouldExistAsync(string entityType, string name) + { + var tag = await _tagRepository.AnyAsync(entityType, name); + + tag.ShouldBeTrue(); + } + + [Fact] + public async Task ShouldNotExistAsync() + { + var tag = await _tagRepository.AnyAsync("not_exist_entity", Guid.NewGuid().ToString()); + + tag.ShouldBeFalse(); + } + + [Theory] + [InlineData("Lyrics", "Imagine Dragons")] + [InlineData("Lyrics", "Music")] + [InlineData("LyricsAlso", "Imagine Dragons")] + [InlineData("LyricsAlso", "Music")] + [InlineData("LyricsAlso", "Most Loved Part")] + public async Task ShouldFindAsync(string entityType, string name) + { + var tag = await _tagRepository.FindAsync(entityType, name); + + tag.ShouldNotBeNull(); + } + + [Fact] + public async Task ShouldNotFindAsync() + { + var tag = await _tagRepository.FindAsync("not_exist_entity", Guid.NewGuid().ToString()); + + tag.ShouldBeNull(); + } + + [Fact] + public async Task Should_Get_Related_Tags() + { + var content_1_tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.Content_1_EntityType, _cmsKitTestData.Content_1_EntityType); + + content_1_tags.Count.ShouldBe(_cmsKitTestData.Content_1_Tags.Length); + + foreach (var tag in content_1_tags) + { + _cmsKitTestData.Content_1_Tags.Contains(tag.Name).ShouldBeTrue(); + } + + var content_2_tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.Content_2_EntityType, _cmsKitTestData.Content_2_EntityType); + + content_2_tags.Count.ShouldBe(_cmsKitTestData.Content_2_Tags.Length); + + foreach (var tag in content_2_tags) + { + _cmsKitTestData.Content_2_Tags.Contains(tag.Name).ShouldBeTrue(); + } + } + + [Fact] + public async Task Should_Not_Get_Related_Tags() + { + var tags = await _tagRepository.GetAllRelatedTagsAsync("not_exist_entity", Guid.NewGuid().ToString()); + + tags.Count.ShouldBe(0); + } } } \ No newline at end of file From d1c4438143001046b1878f4227febdad2e78eac2 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Mon, 28 Dec 2020 16:35:21 +0300 Subject: [PATCH 49/54] Update modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs --- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6f8ae1504b..49240f0d9a 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 @@ -66,7 +66,7 @@ namespace Volo.CmsKit.Tags { var entityTagIds = await DbContext.Set() .Where(q => q.EntityId == entityId && q.TenantId == tenantId) - .Select(q => q.EntityId) + .Select(q => q.TagId) .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); var query = DbSet From 3b7657bb0b0629c9c6fd3d7f76e847552bc7f2cf Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 28 Dec 2020 16:40:34 +0300 Subject: [PATCH 50/54] CmsKit - Fix Unsupported mongo query --- .../CmsKit/MongoDB/Tags/MongoTagRepository.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 6844c9a064..5f57d835f5 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 @@ -8,6 +8,7 @@ using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Tags; +using Tag = Volo.CmsKit.Tags.Tag; namespace Volo.CmsKit.MongoDB.Tags { @@ -31,7 +32,7 @@ namespace Volo.CmsKit.MongoDB.Tags cancellationToken); } - public Task GetAsync( + public Task GetAsync( [NotNull] string entityType, [NotNull] string name, Guid? tenantId = null, @@ -44,7 +45,7 @@ namespace Volo.CmsKit.MongoDB.Tags cancellationToken: cancellationToken); } - public Task FindAsync( + public Task FindAsync( [NotNull] string entityType, [NotNull] string name, Guid? tenantId = null, @@ -57,7 +58,7 @@ namespace Volo.CmsKit.MongoDB.Tags cancellationToken: cancellationToken); } - public virtual async Task> GetAllRelatedTagsAsync( + public virtual async Task> GetAllRelatedTagsAsync( [NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, @@ -65,13 +66,15 @@ namespace Volo.CmsKit.MongoDB.Tags { var entityTagIds = await DbContext.EntityTags.AsQueryable() .Where(q => q.EntityId == entityId && q.TenantId == tenantId) - .Select(q => q.EntityId) + .Select(q => q.TagId) .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); - var query = GetMongoQueryable() - .Where(x => x.EntityType == entityType && - x.TenantId == tenantId && - entityTagIds.Contains(x.Id.ToString())); + var query = await Collection.FindAsync(Builders.Filter.And(new[] + { + Builders.Filter.Eq(x =>x.EntityType, entityType), + Builders.Filter.Eq(x =>x.TenantId, tenantId), + Builders.Filter.In(x => x.Id, entityTagIds), + })); var result = await query.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); return result; From 3f76c8d2d21d9baa16bc35f47c23ad25a8a570ed Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 16:41:56 +0300 Subject: [PATCH 51/54] Update TagManager.cs --- .../src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 bc450ebf7b..2dc1f0b28c 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 @@ -59,14 +59,14 @@ namespace Volo.CmsKit.Tags CancellationToken cancellationToken = default) { var entity = await _tagRepository.GetAsync(id, cancellationToken: cancellationToken); - - entity.SetName(name); - - if (await _tagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken)) + + if (name != entity.Name && await _tagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken)) { throw new BusinessException(message: "Tag already exist!"); // Already Exist } + entity.SetName(name); + return await _tagRepository.UpdateAsync(entity); } } From 68f9c3f7ca5fc2a5454ddae053ab38a89281f8e3 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 28 Dec 2020 16:42:01 +0300 Subject: [PATCH 52/54] Create TagManager_Tests.cs --- .../Tags/TagManager_Tests.cs | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Tags/TagManager_Tests.cs diff --git a/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Tags/TagManager_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Tags/TagManager_Tests.cs new file mode 100644 index 0000000000..aa31b015cc --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Tags/TagManager_Tests.cs @@ -0,0 +1,104 @@ +using System; +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace Volo.CmsKit.Tags +{ + public class TagManager_Tests : CmsKitDomainTestBase + { + private readonly CmsKitTestData _cmsKitTestData; + private readonly TagManager _tagManager; + + private readonly ITagRepository _tagRepository; + + public TagManager_Tests() + { + _cmsKitTestData = GetRequiredService(); + _tagManager = GetRequiredService(); + _tagRepository = GetRequiredService(); + } + + [Fact] + public async Task ShouldAddWhenGettingAsync() + { + var newTagEntityType = "testEntity"; + var newTagName = "test_tag_2123"; + + var doesExist = await _tagRepository.AnyAsync(newTagEntityType, newTagName); + + doesExist.ShouldBeFalse(); + + var newTag = await _tagManager.GetOrAddAsync(newTagEntityType, newTagName); + + newTag.ShouldNotBeNull(); + + var doesExistAgain = await _tagRepository.AnyAsync(newTagEntityType, newTagName); + + doesExistAgain.ShouldBeTrue(); + } + + [Fact] + public async Task ShouldNotAddWhenGettingAsync() + { + var tagName = _cmsKitTestData.Content_1_Tags[0]; + + var tag = await _tagRepository.GetAsync(_cmsKitTestData.Content_1_EntityType, tagName); + + var newTag = await _tagManager.GetOrAddAsync(_cmsKitTestData.Content_1_EntityType, tag.Name); + + newTag.ShouldNotBeNull(); + + newTag.Id.ShouldBe(tag.Id); + } + + [Fact] + public async Task ShouldInsert() + { + var tag = await _tagManager.InsertAsync(Guid.NewGuid(), "test", "test"); + + tag.ShouldNotBeNull(); + + var doesExist = await _tagRepository.AnyAsync("test", "test"); + + doesExist.ShouldBeTrue(); + } + + [Fact] + public async Task ShouldNotInsert() + { + var type = _cmsKitTestData.Content_1_EntityType; + var name = _cmsKitTestData.Content_1_Tags[0]; + + Should.Throw(async () => await _tagManager.InsertAsync(Guid.NewGuid(), type, name)); + } + + [Fact] + public async Task ShouldUpdate() + { + var type = _cmsKitTestData.Content_1_EntityType; + var name = _cmsKitTestData.Content_1_Tags[0]; + var newName = name + "-updated"; + + var tag = await _tagRepository.GetAsync(type, name); + + await _tagManager.UpdateAsync(tag.Id, newName); + + var updatedTag = await _tagRepository.GetAsync(type, newName); + + updatedTag.Id.ShouldBe(tag.Id); + } + + [Fact] + public async Task ShouldNotUpdate() + { + var type = _cmsKitTestData.Content_1_EntityType; + var name = _cmsKitTestData.Content_1_Tags[0]; + var newName = _cmsKitTestData.Content_1_Tags[1]; + + var tag = await _tagRepository.GetAsync(type, name); + + Should.Throw(async () => await _tagManager.UpdateAsync(tag.Id, newName)); + } + } +} \ No newline at end of file From 2fa7fd24b913f396e78eaa5c8e02a3cf4b0bf543 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 28 Dec 2020 17:21:14 +0300 Subject: [PATCH 53/54] Update EfCoreTagRepository.cs --- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 49240f0d9a..593905cc95 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 @@ -72,7 +72,7 @@ namespace Volo.CmsKit.Tags var query = DbSet .Where(x => x.EntityType == entityType && x.TenantId == tenantId && - entityTagIds.Contains(x.Id.ToString())); + entityTagIds.Contains(x.Id)); return await query.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); } From f192860fa34fb96f944f3d4939b895a23bd45524 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 28 Dec 2020 17:25:53 +0300 Subject: [PATCH 54/54] Fix mismatching parameter in TagRepository_Test --- .../test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs index 4a7070a20a..18cc12df68 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs @@ -86,7 +86,7 @@ namespace Volo.CmsKit.Tags [Fact] public async Task Should_Get_Related_Tags() { - var content_1_tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.Content_1_EntityType, _cmsKitTestData.Content_1_EntityType); + var content_1_tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.Content_1_EntityType, _cmsKitTestData.EntityId1); content_1_tags.Count.ShouldBe(_cmsKitTestData.Content_1_Tags.Length); @@ -95,7 +95,7 @@ namespace Volo.CmsKit.Tags _cmsKitTestData.Content_1_Tags.Contains(tag.Name).ShouldBeTrue(); } - var content_2_tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.Content_2_EntityType, _cmsKitTestData.Content_2_EntityType); + var content_2_tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.Content_2_EntityType, _cmsKitTestData.EntityId2); content_2_tags.Count.ShouldBe(_cmsKitTestData.Content_2_Tags.Length);