API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Property.cs 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. using UnivateProperties_API.Containers.Property;
  5. using UnivateProperties_API.Model.ProcessFlow;
  6. using UnivateProperties_API.Model.Region;
  7. using UnivateProperties_API.Model.Timeshare;
  8. using UnivateProperties_API.Model.Users;
  9. namespace UnivateProperties_API.Model.Properties
  10. {
  11. public class Property : BaseEntity
  12. {
  13. private int? _StatusID;
  14. #region Properties
  15. [ForeignKey("PropertyType")]
  16. public int PropertyTypeId { get; set; }
  17. public string PropertyName { get; set; }
  18. public string Unit { get; set; }
  19. public decimal OperationalCosts { get; set; }
  20. public decimal Price { get; set; }
  21. public string PricePer { get; set; }
  22. public bool IsSale { get; set; }
  23. public string Description { get; set; }
  24. public string ShortDescription { get; set; }
  25. public string AddressLine1 { get; set; }
  26. public string AddressLine2 { get; set; }
  27. public string AddressLine3 { get; set; }
  28. public int SuburbId { get; set; }
  29. public int CityId { get; set; }
  30. public int ProvinceId { get; set; }
  31. public bool Published { get; set; }
  32. public DateTime DatePublished { get; set; }
  33. public string VirtualTour { get; set; }
  34. public string Video { get; set; }
  35. [ForeignKey("Status")]
  36. public int? StatusId
  37. {
  38. get
  39. {
  40. return _StatusID;
  41. }
  42. set
  43. {
  44. _StatusID = value;
  45. if (value != null)
  46. {
  47. StatusDate = DateTime.Now;
  48. }
  49. }
  50. }
  51. [ForeignKey("Owner")]
  52. public int? OwnerId { get; set; }
  53. [ForeignKey("Agent")]
  54. public int? AgentId { get; set; }
  55. [ForeignKey("Agency")]
  56. public int? AgencyId { get; set; }
  57. public DateTime DateAvailable { get; set; }
  58. public DateTime StatusDate { get; set; }
  59. public virtual PropertyType PropertyType { get; set; }
  60. [NotMapped]
  61. public Province Province { get; set; }
  62. [NotMapped]
  63. public City City { get; set; }
  64. [NotMapped]
  65. public Suburb Suburb { get; set; }
  66. [NotMapped]
  67. public Status Status { get; set; }
  68. public virtual Individual Owner { get; set; }
  69. public virtual Agent Agent { get; set; }
  70. public virtual Agency Agency { get; set; }
  71. public ICollection<PropertyUserField> PropertyUserFields { get; set; }
  72. public ICollection<PropertyImage> PropertyImages { get; set; }
  73. public ICollection<BidItem> BidItems { get; set; }
  74. public ICollection<ProcessFlow.ProcessFlow> ProcessFlows { get; set; }
  75. [NotMapped]
  76. public List<PropertyDetailGroup> DisplayData { get; set; }
  77. #endregion
  78. }
  79. }