first commit
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Landmark.OLA.Models.Addresses;
|
||||
using Landmark.OLA.Models.Individuals.Enums;
|
||||
using Landmark.OLA.Models.Residences;
|
||||
|
||||
namespace Landmark.OLA.Models.Individuals
|
||||
{
|
||||
public class HistoryIndividual : IIndividualHistory
|
||||
{
|
||||
public Guid Id { get; }
|
||||
|
||||
[Required]
|
||||
[StringLength(60, MinimumLength = 1)]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
[StringLength(1, MinimumLength = 0)]
|
||||
[RegularExpression(@"[a-zA-Z]")]
|
||||
public string MiddleInitial { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(60, MinimumLength = 1)]
|
||||
public string LastName { get; set; }
|
||||
|
||||
public Suffix? Suffix { get; set; }
|
||||
|
||||
[Required]
|
||||
public CurrentResidenceAddress Address { get; set; }
|
||||
|
||||
public Address MailingAddress { get; set; }
|
||||
|
||||
[Required]
|
||||
//Nullable so that there is no default value
|
||||
public LanguageOption? Language { get; set; }
|
||||
|
||||
//A value is required for decisioning. May require input from user in the future.
|
||||
[StringLength(60)]
|
||||
public string CustomerNumber { get; set; } = "0";
|
||||
|
||||
[Required]
|
||||
//Nullable so that there is no default value
|
||||
public DateTime? DOB { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(9, MinimumLength = 9)]
|
||||
[RegularExpression(@"[0-9]+")]
|
||||
public string SSN { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(180, MinimumLength = 10)]
|
||||
//CRIF accepts up to 180 characters.
|
||||
//Dashes, periods, and parentheses are accepted but ignored.
|
||||
//Numbers, letters, pound signs, and spaces are kept.
|
||||
public string Phone { get; set; }
|
||||
|
||||
[Required]
|
||||
//Nullable so that there is no default value
|
||||
public PhoneType? PhoneType { get; set; }
|
||||
|
||||
[StringLength(180, MinimumLength = 10)]
|
||||
public string SecondaryPhone { get; set; }
|
||||
|
||||
public PhoneType? SecondaryPhoneType { get; set; }
|
||||
|
||||
[Required] //Required by Landmark
|
||||
[StringLength(180, MinimumLength = 3)]
|
||||
[RegularExpression(@".+@.+")]
|
||||
//Given that a user could enter a fake address,
|
||||
//this is not exhaustive check for a valid address form
|
||||
public string Email { get; set; }
|
||||
|
||||
[StringLength(180)]
|
||||
[RegularExpression(@".+@.+")]
|
||||
public string PrimaryApplicantEmail { get; set; }
|
||||
|
||||
[StringLength(180)]
|
||||
[RegularExpression(@".+@.+")]
|
||||
public string CoApplicantEmail { get; set; }
|
||||
|
||||
//TODO #228: Enforce time requirement of total MonthsResided across Address (on IndividualBase) and PreviousAddresses
|
||||
public ICollection<ResidenceAddress> PreviousAddresses { get; set; }
|
||||
|
||||
public ICollection<Employer> Employers { get; set; }
|
||||
|
||||
public ICollection<Income> OtherIncomes { get; set; }
|
||||
|
||||
public bool? IsLandmarkEmployee { get; set; }
|
||||
|
||||
public HistoryIndividual()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public HistoryIndividual(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public bool HasOptedOutTCPA { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user