API
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Property.cs 3.0KB

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