using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Web; namespace HealthchoiceMVC.Models { public class PracticeLocation { [Key] public int PracticeLocationId{ get; set; } [Required] [Display(Name = "Practice Name")] public int PracticeId { get; set; } [Required] [Display(Name = "Location Name")] [MaxLength(100)] [StringLength(100)] public string PracticeLocationName { get; set; } [Required] [Display(Name = "Location Contact Name")] [MaxLength(100)] [StringLength(100)] public string PracticeManagerName { get; set; } [Required] [Display(Name = "Location Manager Contact Number")] [MaxLength(12)] [RegularExpression(@"^\+?[()0-9]+$", ErrorMessage = "Primary location manager contact number can only contain numerics, + or ()")] [StringLength(12)] public string LocationManagerContactNumber { get; set; } [Required] [Display(Name = "Location Contact Email")] [MaxLength(150)] [StringLength(150)] public string LocationManagerContactEmail { get; set; } [Required] [Display(Name = "Address Line 1")] public string AddressLineOne { get; set; } [Required] [Display(Name = "Address Line 2")] public string AddressLineTwo { get; set; } [Display(Name = "Area or Suburb")] [MaxLength(50)] public string AreaSuburb { get; set; } [Required] [Display(Name = "City or Town")] [MaxLength(250)] public string CityTown { get; set; } [Required] [Display(Name = "Postal Code")] [MaxLength(250)] public string PostalCode { get; set; } [Display(Name = "Location Contact Number")] [MaxLength(12)] [RegularExpression(@"^\+?[()0-9]+$", ErrorMessage = "Location contact number can only contain numerics, + or ()")] [StringLength(12)] public string LocationContactNumber { get; set; } [Display(Name = "Location Contact Email")] [MaxLength(150)] [StringLength(150)] public string LocationContactEmail { get; set; } [ForeignKey("PracticeId")] public virtual Practice Practice { get; set; } } }