mirror of https://github.com/abpframework/abp.git
6 changed files with 79 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||
namespace Volo.CmsKit.Reactions |
|||
{ |
|||
public class CreateReactionDto |
|||
{ |
|||
public string EntityName { get; set; } |
|||
|
|||
public string EntityId { get; set; } |
|||
|
|||
public string ReactionType { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.CmsKit.Reactions |
|||
{ |
|||
public class GetReactionResultDto |
|||
{ |
|||
public List<ReactionCountDto> AllReactions { get; set; } |
|||
|
|||
//TODO: Reactions of the current user (if available)
|
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace Volo.CmsKit.Reactions |
|||
{ |
|||
public interface IReactionAppService : IApplicationService |
|||
{ |
|||
public Task<GetReactionResultDto> CreateAsync(CreateReactionDto input); |
|||
|
|||
public Task<GetReactionResultDto> GetAsync(string entityName, string entityId); |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
namespace Volo.CmsKit.Reactions |
|||
{ |
|||
public class ReactionCountDto |
|||
{ |
|||
public string ReactionType { get; set; } |
|||
|
|||
public int Count { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.CmsKit.Reactions |
|||
{ |
|||
public class ReactionAppService : CmsKitAppService, IReactionAppService |
|||
{ |
|||
public Task<GetReactionResultDto> CreateAsync(CreateReactionDto input) |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
|
|||
public Task<GetReactionResultDto> GetAsync(string entityName, string entityId) |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Volo.CmsKit.Reactions |
|||
{ |
|||
public class Reaction : Entity<Guid>, IAggregateRoot<Guid>, IHasCreationTime, IMustHaveCreator |
|||
{ |
|||
public string EntityName { get; set; } //TODO: int or create a more common EntityTypes entity/table/...
|
|||
|
|||
public string EntityId { get; set; } |
|||
|
|||
public string ReactionType { get; set; } |
|||
|
|||
public DateTime CreationTime { get; set; } |
|||
|
|||
public Guid CreatorId { get; set; } |
|||
} |
|||
} |
|||
Loading…
Reference in new issue