You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
484 B
16 lines
484 B
namespace Model;
|
|
|
|
public class BlackList
|
|
{
|
|
public string Email { get; set; }
|
|
public DateOnly ExpirationDate { get; set; }
|
|
|
|
public BlackList(string email, DateOnly expirationDate)
|
|
{
|
|
if (email is null or "")
|
|
throw new ArgumentException("Email cannot be null or empty");
|
|
ArgumentOutOfRangeException.ThrowIfLessThan(expirationDate, DateOnly.FromDateTime(DateTime.Now));
|
|
Email = email;
|
|
ExpirationDate = expirationDate;
|
|
}
|
|
} |