refactor(Receiver): bring related props from EnvelopeReceiver

This commit is contained in:
tekh 2025-08-21 13:36:48 +02:00
parent ac70aaa527
commit 5fb4d03ee7
2 changed files with 20 additions and 18 deletions

View File

@ -79,15 +79,9 @@ public class EnvelopeReceiver
Company { get; set; }
#region Model of old serice
[NotMapped]
public DateTime SignedDate { get; set; } = DateTime.MinValue;
[NotMapped]
public Constants.ReceiverStatus Status { get; set; }
[NotMapped]
public Constants.ColorType ColorType { get; set; }
[NotMapped]
public bool HasId => Id.Item1 > 0 && Id.Item2 > 0;
@ -95,18 +89,6 @@ public class EnvelopeReceiver
public bool HasEmailAndName =>
!string.IsNullOrWhiteSpace(Receiver.EmailAddress) &&
!string.IsNullOrWhiteSpace(Name);
[NotMapped]
public string SignedDateDisplayValue =>
SignedDate == DateTime.MinValue ? "-" : SignedDate.ToString("G");
[NotMapped]
public Color Color => ColorType.ToColor();
public string GetSignature()
{
return Receiver.EmailAddress.ToUpperInvariant().GetChecksum();
}
#endregion
}

View File

@ -41,6 +41,26 @@ public class Receiver
public DateTime? TfaRegDeadline { get; set; }
public List<EnvelopeReceiver> EnvelopeReceivers { get; set; }
#region Model of old serice
[NotMapped]
public DateTime SignedDate { get; set; } = DateTime.MinValue;
[NotMapped]
public Constants.ColorType ColorType { get; set; }
[NotMapped]
public string SignedDateDisplayValue =>
SignedDate == DateTime.MinValue ? "-" : SignedDate.ToString("G");
[NotMapped]
public Color Color => ColorType.ToColor();
public string GetSignature()
{
return EmailAddress.ToUpperInvariant().GetChecksum();
}
#endregion
}
#if NETFRAMEWORK