Appendix.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace GreenTree.Nachtragsmanagement.Core.Domain.Appendix
  7. {
  8. public class Appendix : BaseEntity
  9. {
  10. #region Fields
  11. /// <summary>
  12. /// Categories values related to the appendix
  13. /// </summary>
  14. private ICollection<CategoryValue> _categoryValues;
  15. /// <summary>
  16. /// Deviations related to the appendix
  17. /// </summary>
  18. private ICollection<Deviation.Deviation> _deviations;
  19. /// <summary>
  20. /// Invoices related to the appendix
  21. /// </summary>
  22. private ICollection<Invoice.Invoice> _invoices;
  23. #endregion
  24. /// <summary>
  25. /// Customized number for identification
  26. /// </summary>
  27. public string CustomNumber { get; set; }
  28. /// <summary>
  29. /// The lot
  30. /// </summary>
  31. public string Description { get; set; }
  32. /// <summary>
  33. /// Monetary value of all corresponding deviations
  34. /// </summary>
  35. public decimal? Value { get; set; }
  36. /// <summary>
  37. /// Montary percentage value
  38. /// </summary>
  39. public decimal? Percentage { get; set; }
  40. /// <summary>
  41. /// Number of corresponding offer
  42. /// </summary>
  43. public int? OfferingNumber { get; set; }
  44. /// <summary>
  45. /// Date when corresponding offer was created
  46. /// </summary>
  47. public DateTime? OfferingDate { get; set; }
  48. /// <summary>
  49. /// Date of negotiation
  50. /// </summary>
  51. public DateTime? NegotiationDate { get; set; }
  52. /// <summary>
  53. /// Value of negotiation
  54. /// </summary>
  55. public decimal? NegotiationValue { get; set; }
  56. /// <summary>
  57. /// Determines if protocol exists
  58. /// </summary>
  59. public bool ProtocolExists { get; set; }
  60. /// <summary>
  61. /// Determines if an order invoice has been created
  62. /// </summary>
  63. public bool OrderInvoiceCreated { get; set; }
  64. /// <summary>
  65. /// Number of the corresponding order
  66. /// </summary>
  67. public int? OrderNumber { get; set; }
  68. /// <summary>
  69. /// Date of the corresponding order
  70. /// </summary>
  71. public DateTime? OrderDate { get; set; }
  72. /// <summary>
  73. /// Editable comment
  74. /// </summary>
  75. public string Comment { get; set; }
  76. /// <summary>
  77. /// Id of corresponding state
  78. /// </summary>
  79. public int? StateId { get; set; }
  80. /// <summary>
  81. /// Corresponding site
  82. /// </summary>
  83. public virtual State State { get; set; }
  84. /// <summary>
  85. /// Id of corresponding site
  86. /// </summary>
  87. public int? SiteId { get; set; }
  88. /// <summary>
  89. /// Corresponding site
  90. /// </summary>
  91. public virtual Site.Site Site { get; set; }
  92. /// <summary>
  93. /// Category values related to the appendix
  94. /// </summary>
  95. public virtual ICollection<CategoryValue> CategoryValues
  96. {
  97. get { return _categoryValues ?? (_categoryValues = new List<CategoryValue>()); }
  98. protected set { _categoryValues = value; }
  99. }
  100. /// <summary>
  101. /// Deviations related to the appendix
  102. /// </summary>
  103. public virtual ICollection<Deviation.Deviation> Deviations
  104. {
  105. get { return _deviations ?? ( _deviations = new List<Deviation.Deviation>()); }
  106. protected set { _deviations = value; }
  107. }
  108. /// <summary>
  109. /// Invoices related to the appendix
  110. /// </summary>
  111. public virtual ICollection<Invoice.Invoice> Invoices
  112. {
  113. get { return _invoices ?? (_invoices = new List<Invoice.Invoice>()); }
  114. protected set { _invoices = value; }
  115. }
  116. #region Helper
  117. public void SetCategoryValues(ICollection<CategoryValue> categoryValues)
  118. {
  119. CategoryValues = categoryValues;
  120. }
  121. #endregion
  122. }
  123. }