feat(EnvelopeReceiverBase): HasPhoneNumber-Eigenschaft sowohl zur Entität als auch zum DTO hinzugefügt
This commit is contained in:
parent
423b293197
commit
b4a97abe6b
@ -25,5 +25,7 @@ namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
|
||||
public DateTime AddedWhen { get; init; }
|
||||
|
||||
public DateTime? ChangedWhen { get; init; }
|
||||
|
||||
public bool HasPhoneNumber { get; init; }
|
||||
}
|
||||
}
|
||||
@ -46,6 +46,10 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
|
||||
|
||||
[NotMapped]
|
||||
public bool HasPhoneNumber => PhoneNumber is not null;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user