API
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 bool Published { get; set; }
  37. public DateTime DatePublished { get; set; }
  38. public string VirtualTour { get; set; }
  39. public string Video { get; set; }
  40. [ForeignKey("Status")]
  41. public int? StatusId
  42. {
  43. get
  44. {
  45. return _StatusID;
  46. }
  47. set
  48. {
  49. _StatusID = value;
  50. if (value != null)
  51. {
  52. StatusDate = DateTime.Now;
  53. }
  54. }
  55. }
  56. [ForeignKey("Owner")]
  57. public int? OwnerId { get; set; }
  58. [ForeignKey("Agent")]
  59. public int? AgentId { get; set; }
  60. [ForeignKey("Agency")]
  61. public int? AgencyId { get; set; }
  62. public DateTime DateAvailable { get; set; }
  63. public DateTime StatusDate { get; set; }
  64. public virtual PropertyType PropertyType { get; set; }
  65. [NotMapped]
  66. public Status Status { get; set; }
  67. public virtual Individual Owner { get; set; }
  68. public virtual Agent Agent { get; set; }
  69. public virtual Agency Agency { get; set; }
  70. public ICollection<PropertyUserField> PropertyUserFields { get; set; }
  71. public ICollection<PropertyImage> PropertyImages { get; set; }
  72. public ICollection<BidItem> BidItems { get; set; }
  73. public ICollection<ProcessFlow.ProcessFlow> ProcessFlows { get; set; }
  74. [NotMapped]
  75. public List<PropertyDetailGroup> DisplayData { get; set; }
  76. #endregion
  77. }
  78. }