using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.Spatial; using System.Web.Mvc; namespace OSS.Models { public class ProjectProfileExternal { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProjectID { get; set; } public string ProjectCode { get; set; } [Required] [RegularExpression(@"^[a-zA-Z0-9 &'\(\)-\/_.,]+$", ErrorMessage = "Please enter a valid project name")] public string ProjectName { get; set; } public string CompanyTIN { get; set; } [RegularExpression(@"^[a-zA-Z0-9 &'\(\)-\/_.,]+$", ErrorMessage = "Please enter a valid activity description")] [Required] public string MainActivity { get; set; } [Required(ErrorMessage = "Production capacity is required.")] [Range(0, double.MaxValue, ErrorMessage = "Production capacity must be a decimal value.")] public string ProductionCapacity { get; set; } [StringLength(255)] public string CompanyName { get; set; } [DataType(DataType.EmailAddress, ErrorMessage = "Invalid email address")] [Required] public string ContactEmail { get; set; } public string StepName { get; set; } public string ServiceName { get; set; } public string LandMarkType { get; set; } [RegularExpression(@"^[a-zA-Z0-9-\/]+$", ErrorMessage = "Invalid plot number")] [StringLength(10, ErrorMessage = "Plot number too long (10)")] public string PlotNumber { get; set; } [RegularExpression(@"^[a-zA-Z0-9-\/]+$", ErrorMessage = "Invalid house number")] [StringLength(10, ErrorMessage = "House number too long (10)")] public string HouseNo { get; set; } [RegularExpression(@"^[a-zA-Z0-9-'\(\)&._\/ ]+$", ErrorMessage = "Invalid area description")] [StringLength(20, ErrorMessage = "Area description too long (10)")] public string Area { get; set; } [RegularExpression(@"^[a-zA-Z0-9-'\(\)&._\/ ]+$", ErrorMessage = "Invalid area description")] [StringLength(20, ErrorMessage = "Land mark too long (10)")] public string LandMarkDescription { get; set; } public string Ward { get; set; } public string Street { get; set; } [Required] public string Sector { get; set; } [Required] public string SubSector { get; set; } public string UnitMeasure { get; set; } public string TypeofOwnership { get; set; } [Required] [RegularExpression(@"^[0-9]+$", ErrorMessage = "Please enter a number")] public long? MenForeign { get; set; } [Required] [RegularExpression(@"^[0-9]+$", ErrorMessage = "Please enter a number")] public long? WomenForeign { get; set; } [Required] [RegularExpression(@"^[0-9]+$", ErrorMessage = "Please enter a number")] public long? MenLocal { get; set; } [Required] [RegularExpression(@"^[0-9]+$", ErrorMessage = "Please enter a number")] public long? WomenLocal { get; set; } [Required] public string Telephone { get; set; } [Required] [RegularExpression(@"^[0-9]+$", ErrorMessage = "Please enter a valid postal address")] public string PostalAddress { get; set; } [RegularExpression(@"^[a-zA-Z0-9-\/]+$", ErrorMessage = "Invalid block number")] [StringLength(10, ErrorMessage = "Block number too long (10)")] public string BlockPlotNumber { get; set; } [StringLength(255)] [DataType(DataType.PhoneNumber)] public string ContactMobile { get; set; } [StringLength(255)] public string CompanyType { get; set; } [StringLength(255)] [Required] public string Region { get; set; } [StringLength(255)] [Required] public string District { get; set; } public string AddedBy { get; set; } public string TICCertificateNo { get; set; } public string OriginalCOI { get; set; } public string IssuedDate { get; set; } [RegularExpression(@"^[a-zA-Z-' ]+$", ErrorMessage = "Please enter person name")] public string ContactPerson { get; set; } public string Title { get; set; } public string Mobile { get; set; } public string Email { get; set; } public string AreaType { get; set; } public string ApprovalStatus { get; set; } [Column(TypeName = "datetime2")] public DateTime PaymentDate { get; set; } public string EvaluationStatus { get; set; } [Column(TypeName = "datetime2")] public DateTime LastUpdateDate { get; set; } [Column(TypeName = "datetime2")] public DateTime CreatedDate { get; set; } public string UpdatedBy { get; set; } public IEnumerable ListofDistricts { get; set; } public IEnumerable ListofRegions { get; set; } public IEnumerable ListofWards { get; set; } public IEnumerable ListofSectors { get; set; } public IEnumerable ListofSubectors { get; set; } [ForeignKey("CompanyTIN")] [NotMapped] public virtual CompanyProfileExternal CompanyProfilesExternal { get; set; } } }