create CreateHistoryCommand

This commit is contained in:
tekh 2025-08-25 17:22:26 +02:00
parent 99083a68aa
commit 78100ef24f
2 changed files with 57 additions and 4 deletions

View File

@ -0,0 +1,39 @@
using EnvelopeGenerator.Domain;
namespace EnvelopeGenerator.Application.Histories.Commands;
/// <summary>
///
/// </summary>
public record CreateHistoryCommand
{
/// <summary>
///
/// </summary>
public int EnvelopeId { get; set; }
/// <summary>
///
/// </summary>
public string UserReference { get; set; } = null!;
/// <summary>
///
/// </summary>
public Constants.EnvelopeStatus Status { get; set; }
/// <summary>
///
/// </summary>
public DateTime AddedWhen { get; } = DateTime.Now;
/// <summary>
///
/// </summary>
public DateTime ActionDate => AddedWhen;
/// <summary>
///
/// </summary>
public string? Comment { get; set; }
}

View File

@ -38,14 +38,28 @@ public class EnvelopeHistory
public DateTime AddedWhen { get; set; }
[Column("ACTION_DATE", TypeName = "datetime")]
public DateTime ActionDate { get; set; } = DateTime.Now;
public DateTime? ActionDate { get; set; } = DateTime.Now;
[Column("COMMENT", TypeName = "nvarchar(max)")]
public string Comment { get; set; }
public string
#if NET
?
#endif
Comment { get; set; }
public virtual User Sender { get; set; }
public virtual User
#if NET
?
#endif
Sender
{ get; set; }
public virtual Receiver Receiver { get; set; }
public virtual Receiver
#if NET
?
#endif
Receiver
{ get; set; }
#if NETFRAMEWORK
[NotMapped]