55 lines
1.6 KiB
C#
55 lines
1.6 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using Landmark.OLA.Models.Individuals.Enums;
|
|
|
|
namespace Landmark.OLA.Models.Individuals
|
|
{
|
|
public class Employer : OlaModel
|
|
{
|
|
[Required]
|
|
[StringLength(60, MinimumLength = 1)]
|
|
//Due to downstream CRIF issues, applications with employer names containing special characters will be denied
|
|
[RegularExpression(@"[a-zA-Z0-9 ]*")]
|
|
public string Name { get; set; }
|
|
|
|
[Required]
|
|
//Nullable so that there is no default value
|
|
public bool? CurrentEmployer { get; set; } // "isCurrentFL"
|
|
|
|
[Required]
|
|
//Nullable so that there is no default value
|
|
public EmploymentTypeOption EmploymentType { get; set; }
|
|
|
|
[Required]
|
|
[StringLength(60, MinimumLength = 1)]
|
|
public string Title { get; set; }
|
|
|
|
[Required]
|
|
public Income Income { get; set; }
|
|
|
|
//[Required]
|
|
//The current front end offers an upper limit of 10 years, 11 months.
|
|
[Range(0, 130)]
|
|
public int MonthsEmployed { get; set; }
|
|
|
|
//[Required]
|
|
//Nullable so that there is no default value
|
|
public DateTime? StartDate { get; set; }
|
|
|
|
// Required if CurrentEmployer == false
|
|
//Nullable so that there is no default value
|
|
public DateTime? EndDate { get; set; }
|
|
|
|
[MaxLength(180)]
|
|
public string WorkPhone { get; set; }
|
|
|
|
[Required]
|
|
//Nullable so that there is no default value
|
|
public LanguageOption? Language;
|
|
|
|
public Employer(Guid? employerId = null)
|
|
{
|
|
Id = employerId.HasValue ? employerId.Value.ToString() : null;
|
|
}
|
|
}
|
|
}
|