diff --git a/EnvelopeGenerator.Application/Histories/Commands/CreateHistoryCommand.cs b/EnvelopeGenerator.Application/Histories/Commands/CreateHistoryCommand.cs new file mode 100644 index 00000000..ad228144 --- /dev/null +++ b/EnvelopeGenerator.Application/Histories/Commands/CreateHistoryCommand.cs @@ -0,0 +1,39 @@ +using EnvelopeGenerator.Domain; + +namespace EnvelopeGenerator.Application.Histories.Commands; + +/// +/// +/// +public record CreateHistoryCommand +{ + /// + /// + /// + public int EnvelopeId { get; set; } + + /// + /// + /// + public string UserReference { get; set; } = null!; + + /// + /// + /// + public Constants.EnvelopeStatus Status { get; set; } + + /// + /// + /// + public DateTime AddedWhen { get; } = DateTime.Now; + + /// + /// + /// + public DateTime ActionDate => AddedWhen; + + /// + /// + /// + public string? Comment { get; set; } +} \ No newline at end of file diff --git a/EnvelopeGenerator.Domain/Entities/EnvelopeHistory.cs b/EnvelopeGenerator.Domain/Entities/EnvelopeHistory.cs index df21b016..4a6d0399 100644 --- a/EnvelopeGenerator.Domain/Entities/EnvelopeHistory.cs +++ b/EnvelopeGenerator.Domain/Entities/EnvelopeHistory.cs @@ -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]