Refactored CreateDocStatusCommand to remove inheritance from ModifyDocStatusCommandBase and define its own properties. Added EnvelopeId, ReceiverId, and Value properties. Removed the AddedWhen property. The class now directly implements IRequest<DocumentStatus>.
41 lines
996 B
C#
41 lines
996 B
C#
using DigitalData.Core.Abstraction.Application.Repository;
|
|
using EnvelopeGenerator.Application.Common.Commands;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
using MediatR;
|
|
|
|
namespace EnvelopeGenerator.Application.DocStatus.Commands;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public record CreateDocStatusCommand : IRequest<DocumentStatus>
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int EnvelopeId { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int ReceiverId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the display value associated with the status.
|
|
/// </summary>
|
|
public string? Value { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class CreateDocStatusCommandHandler : CreateCommandHandler<CreateDocStatusCommand, DocumentStatus>
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="repository"></param>
|
|
public CreateDocStatusCommandHandler(IRepository<DocumentStatus> repository) : base(repository)
|
|
{
|
|
}
|
|
} |