Update ReferenceType enum and clean up status handling
Modified the `ReferenceType` enum in `Constants.vb` to change the values for `Sender` and `Receiver`. Removed the `ReferenceType` and `StatusName` properties from `EnvelopeHistory.cs`. Updated status code comments in `HistoryController.cs`, adding new codes for `EnvelopeRejected` and `EnvelopeWithdrawn`, and adjusted parameter descriptions to align with the new enum values.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static EnvelopeGenerator.Common.Constants;
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
@@ -42,19 +41,5 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
[ForeignKey("UserReference")]
|
||||
public virtual Receiver? Receiver { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public ReferenceType ReferenceType => (Status / 1000) switch
|
||||
{
|
||||
1 => ReferenceType.Sender,
|
||||
2 or 3 => ReferenceType.Receiver,
|
||||
_ => ReferenceType.Unknown,
|
||||
};
|
||||
|
||||
[NotMapped]
|
||||
public string? StatusName
|
||||
=> (Enum.IsDefined(typeof(EnvelopeStatus), Status))
|
||||
? Enum.GetName(typeof(EnvelopeStatus), Status)
|
||||
: null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user