first commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Landmark.OLA.Models.Addresses.Enums;
|
||||
|
||||
namespace Landmark.OLA.Models.Addresses
|
||||
{
|
||||
public class Address : IAddress
|
||||
{
|
||||
[Required]
|
||||
[StringLength(40)]
|
||||
public string Address1 { get; set; }
|
||||
|
||||
[StringLength(40)]
|
||||
public string Address2 { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100)]
|
||||
public string City { get; set; }
|
||||
|
||||
[Required]
|
||||
//Nullable so that there is no default value
|
||||
public StateOption? State { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(5, MinimumLength = 5)]
|
||||
public string PostalCode { get; set; }
|
||||
|
||||
[StringLength(4, MinimumLength = 4)]
|
||||
public string PostalCodeExt { get; set; }
|
||||
|
||||
[Required]
|
||||
//Nullable so that there is no default value.
|
||||
public CountryOption? Country { get; set; }
|
||||
|
||||
public Guid Id { get; private set; }
|
||||
|
||||
public Address()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public Address(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user