mirror of https://github.com/abpframework/abp.git
7 changed files with 117 additions and 1 deletions
@ -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<Blog, BlogEto>(); |
||||
|
CreateMap<Comment, CommentEto>(); |
||||
|
CreateMap<Post, PostEto>(); |
||||
|
CreateMap<Tag, TagEto>(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
using System; |
||||
|
using JetBrains.Annotations; |
||||
|
|
||||
|
namespace Volo.Blogging.Blogs |
||||
|
{ |
||||
|
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; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace Volo.Blogging.Comments |
||||
|
{ |
||||
|
public class CommentEto |
||||
|
{ |
||||
|
public Guid Id { get; set; } |
||||
|
|
||||
|
public Guid PostId { get; set; } |
||||
|
|
||||
|
public Guid? RepliedCommentId { get; set; } |
||||
|
|
||||
|
public string Text { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
using JetBrains.Annotations; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Volo.Blogging.Posts |
||||
|
{ |
||||
|
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; } |
||||
|
|
||||
|
public ICollection<PostTag> Tags { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
using System; |
||||
|
using JetBrains.Annotations; |
||||
|
|
||||
|
namespace Volo.Blogging.Tagging |
||||
|
{ |
||||
|
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; } |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue