using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Web; using HealthchoiceMVC.Models; namespace HealthchoiceMVC.ViewModels { [NotMapped] public class Practitioner_vm { public Person Practitioner { get; set; } [NotMapped] [Required] [Display(Name = "Practice Name")] public int practiceId { get; set; } [NotMapped] [Required] [Display(Name = "Discipline")] public int prov_discipline_code { get; set; } [NotMapped] [Required] [EmailAddress] [Display(Name = "Email Address")] public string Email { get; set; } [NotMapped] [Required] //[MinLength(10)] //[RegularExpression(@"^\+?[()0-9]+$", ErrorMessage = "Primary contact number can only contain numerics, + or ()")] //[StringLength(15)] [Display(Name = "Contact number")] public string ContactNumber { get; set; } [NotMapped] [Display(Name = "Discipline")] public string prov_discipline_desc { get; set; } [NotMapped] [Display(Name = "Sub-Discipline")] public int prov_sub_discipline_key { get; set; } = 0; [NotMapped] [Display(Name = "Sub-Discipline")] public string prov_sub_discipline_desc { get; set; } = ""; [Required] [Display(Name = "HPCSA Number")] [MaxLength(10, ErrorMessage = "HPCSA practice number can be a maximum length of 10 characters ")] [MinLength(9, ErrorMessage = "HPCSA practice number can be a minimum length of 9 characters")] public string prov_hpcsa_no { get; set; } } [NotMapped] public class RegisterPractitioner_vm : Practitioner_vm { [NotMapped] public int AccountType { get; set; } = 0; [NotMapped] public int pID { get; set; } = 0; [NotMapped] [Required] public string Password { get; set; } = ""; [NotMapped] [Required] [Display(Name ="Confirm Password")] public string ConfirmPassword { get; set; } = ""; [Display(Name = "I have read and accept the terms of use")] //[Range(typeof(bool), "true", "true", ErrorMessage = "You have to accept our terms and conditions.")] public bool TermsAndConditions { get; set; } } [NotMapped] public class Patient_vm { public Person Patient { get; set; } [NotMapped] [Required] [Display(Name = "Medical Scheme")] public int MedicalScheme { get; set; } [NotMapped] [Required] public string FileNumber { get; set; } //[NotMapped] //[Required] //public int Age { get; set; } [NotMapped] [Required] public string SchemeNumber { get; set; } [NotMapped] [Required] [EmailAddress] [Display(Name = "Email Address")] public string Email { get; set; } [NotMapped] [Required] [MinLength(10)] //[RegularExpression(@"^\+?[()0-9]+$", ErrorMessage = "Primary contact number can only contain numerics, + or ()")] [StringLength(15)] [Display(Name = "Contact number")] public string ContactNumber { get; set; } [NotMapped] [Required] [Display(Name = "Address Line 1")] public string AddressLineOne { get; set; } [NotMapped] [Display(Name = "Address Line 2")] public string AddressLineTwo { get; set; } [NotMapped] [Display(Name = "Area or Suburb")] [MaxLength(50)] public string AreaSuburb { get; set; } [NotMapped] [Required] [Display(Name = "City or Town")] [MaxLength(250)] public string CityTown { get; set; } [NotMapped] [Required] [Display(Name = "Postal Code")] [MaxLength(250)] public string PostalCode { get; set; } [NotMapped] [Required] [MaxLength(250)] [Display(Name = "Address Line 1")] public string PostalAddressLineOne { get; set; } [NotMapped] [MaxLength(250)] [Display(Name = "Address Line 2")] public string PostalAddressLineTwo { get; set; } [NotMapped] [Display(Name = "Area or Suburb")] [MaxLength(50)] public string PostalAreaSuburb { get; set; } [NotMapped] [Display(Name = "City or Town")] [MaxLength(250)] public string PostalCityTown { get; set; } [NotMapped] [Required] [Display(Name = "Postal Code")] [MaxLength(250)] public string PostalPostalCode { get; set; } } [NotMapped] public class Admin_vm { public Person AdminPerson { get; set; } [NotMapped] [Required] [Display(Name = "Practice Role")] public int personTypeId { get; set; } = 0; [NotMapped] [Required] [EmailAddress] [Display(Name = "Email Address")] public string Email { get; set; } = ""; [NotMapped] [Required] [MinLength(10)] [RegularExpression(@"^\+?[()0-9]+$", ErrorMessage = "Primary contact number can only contain numerics, + or ()")] [StringLength(15)] [Display(Name = "Contact number")] public string ContactNumber { get; set; } = ""; } }