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 3.0KB

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 bool ShowAddress { get; set; }
  26. public string AddressOther { get; set; }
  27. public string StreetNumber { get; set; }
  28. public string StreetName { get; set; }
  29. public string Suburb { get; set; }
  30. public string City { get; set; }
  31. public string Province { get; set; }
  32. public string Country { get; set; }
  33. public string PostalCode { get; set; }
  34. public string PropertCoords { get; set; }
  35. public string AddressURL { get; set; }
  36. public string PropertyRef { get; set; }
  37. public bool Published { get; set; }
  38. public DateTime DatePublished { get; set; }
  39. public string VirtualTour { get; set; }
  40. public string Video { get; set; }
  41. [ForeignKey("Status")]
  42. public int? StatusId
  43. {
  44. get
  45. {
  46. return _StatusID;
  47. }
  48. set
  49. {
  50. _StatusID = value;
  51. if (value != null)
  52. {
  53. StatusDate = DateTime.Now;
  54. }
  55. }
  56. }
  57. [ForeignKey("Owner")]
  58. public int? OwnerId { get; set; }
  59. [ForeignKey("Agent")]
  60. public int? AgentId { get; set; }
  61. [ForeignKey("Agency")]
  62. public int? AgencyId { get; set; }
  63. public DateTime DateAvailable { get; set; }
  64. public DateTime StatusDate { get; set; }
  65. public virtual PropertyType PropertyType { 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. }