diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Blogs/BlogEto.cs b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Blogs/BlogEto.cs
new file mode 100644
index 0000000000..ceb0b977cf
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Blogs/BlogEto.cs
@@ -0,0 +1,20 @@
+using System;
+using JetBrains.Annotations;
+
+namespace Volo.Blogging.Blogs
+{
+ [Serializable]
+ public class BlogEto
+ {
+ public Guid Id { get; set; }
+
+ [NotNull]
+ public string Name { get; set; }
+
+ [NotNull]
+ public string ShortName { get; set; }
+
+ [CanBeNull]
+ public string Description { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Comments/CommentEto.cs b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Comments/CommentEto.cs
new file mode 100644
index 0000000000..dd1b5ccb41
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Comments/CommentEto.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace Volo.Blogging.Comments
+{
+ [Serializable]
+ public class CommentEto
+ {
+ public Guid Id { get; set; }
+
+ public Guid PostId { get; set; }
+
+ public Guid? RepliedCommentId { get; set; }
+
+ public string Text { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Posts/PostEto.cs b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Posts/PostEto.cs
new file mode 100644
index 0000000000..90a88833c7
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Posts/PostEto.cs
@@ -0,0 +1,29 @@
+using JetBrains.Annotations;
+using System;
+using System.Collections.Generic;
+using Volo.Blogging.Tagging;
+
+namespace Volo.Blogging.Posts
+{
+ [Serializable]
+ public class PostEto
+ {
+ public Guid Id { get; set; }
+
+ public Guid BlogId { get; set; }
+
+ [NotNull]
+ public string Url { get; set; }
+
+ [NotNull]
+ public string CoverImage { get; set; }
+
+ [NotNull]
+ public string Title { get; set; }
+
+ [CanBeNull]
+ public string Content { get; set; }
+
+ public int ReadCount { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Tagging/TagEto.cs b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Tagging/TagEto.cs
new file mode 100644
index 0000000000..0f461a0281
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Tagging/TagEto.cs
@@ -0,0 +1,20 @@
+using System;
+using JetBrains.Annotations;
+
+namespace Volo.Blogging.Tagging
+{
+ [Serializable]
+ public class TagEto
+ {
+ public Guid Id { get; set; }
+
+ public Guid BlogId { get; set; }
+
+ [NotNull]
+ public string Name { get; set; }
+
+ public string Description { get; set; }
+
+ public int UsageCount { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj
index a7cbc2c7c6..73cf0498c5 100644
--- a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj
+++ b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj
@@ -13,6 +13,7 @@
+
diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappingProfile.cs b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappingProfile.cs
new file mode 100644
index 0000000000..da36b39049
--- /dev/null
+++ b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappingProfile.cs
@@ -0,0 +1,19 @@
+using AutoMapper;
+using Volo.Blogging.Blogs;
+using Volo.Blogging.Comments;
+using Volo.Blogging.Posts;
+using Volo.Blogging.Tagging;
+
+namespace Volo.Blogging
+{
+ public class BloggingDomainMappingProfile : Profile
+ {
+ public BloggingDomainMappingProfile()
+ {
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs
index 4690546a7e..f39c4c88fb 100644
--- a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs
+++ b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs
@@ -1,13 +1,37 @@
-using Volo.Abp.Domain;
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.Domain;
+using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Modularity;
+using Volo.Blogging.Blogs;
+using Volo.Blogging.Comments;
+using Volo.Blogging.Posts;
+using Volo.Blogging.Tagging;
namespace Volo.Blogging
{
[DependsOn(
typeof(BloggingDomainSharedModule),
- typeof(AbpDddDomainModule))]
+ typeof(AbpDddDomainModule),
+ typeof(AbpAutoMapperModule))]
public class BloggingDomainModule : AbpModule
{
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAutoMapperObjectMapper();
+ Configure(options =>
+ {
+ options.AddProfile(validate: true);
+ });
+
+ Configure(options =>
+ {
+ options.EtoMappings.Add(typeof(BloggingDomainModule));
+ options.EtoMappings.Add(typeof(BloggingDomainModule));
+ options.EtoMappings.Add(typeof(BloggingDomainModule));
+ options.EtoMappings.Add(typeof(BloggingDomainModule));
+ });
+ }
}
}