API
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Property.cs 3.0KB

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