PosTrx.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. namespace Dfs.WayneChina.PosModelMini
  6. {
  7. public class PosTrx
  8. {
  9. /// <summary>
  10. /// Unique id of the POS transaction.
  11. /// </summary>
  12. public Guid Id { get; set; }
  13. /// <summary>
  14. /// The line items of the POS transaction.
  15. /// </summary>
  16. public virtual List<PosTrxLineItem> Items { get; set; }
  17. /// <summary>
  18. /// The discounts of the POS transaction.
  19. /// </summary>
  20. public virtual List<PosTrxDiscount> Discounts { get; set; }
  21. /// <summary>
  22. /// The payments of the POS transaction.
  23. /// </summary>
  24. public virtual List<PosTrxMop> Payments { get; set; }
  25. /// <summary>
  26. /// Source of the POS transaction, indoor or outdoor.
  27. /// </summary>
  28. public PosTrxSource TransactionSource { get; set; }
  29. /// <summary>
  30. /// POS transaction type.
  31. /// </summary>
  32. public PosTrxType TransactionType { get; set; }
  33. /// <summary>
  34. /// notice, this value could be duplicated due to business requirment (used by rolling).
  35. /// </summary>
  36. [MaxLength(20)]
  37. public string ReceiptId { get; set; }
  38. /// <summary>
  39. /// notice, this value could be duplicated due to business requirment (used by rolling).
  40. /// </summary>
  41. public int ShiftId { get; set; }
  42. /// <summary>
  43. /// Gets or sets the time of the trx posted from POS, POS will set this value from its side.
  44. /// </summary>
  45. [Required]
  46. public DateTime TransactionInitTimeInPos { get; set; }
  47. /// <summary>
  48. /// Gets or sets the time of the trx posted from POS and received by server, server will set this value once received it.
  49. /// </summary>
  50. public DateTime TransactionArrivedAtServerTime { get; set; }
  51. /// <summary>
  52. /// amount that the customer finally needs to pay
  53. /// </summary>
  54. public decimal NetAmount { get; set; }
  55. /// <summary>
  56. /// total amount without discount deducted yet.
  57. /// </summary>
  58. public decimal GrossAmount { get; set; }
  59. /// <summary>
  60. /// Id of the currency used to pay the POS transaction.
  61. /// </summary>
  62. public Guid? CurrencyId { get; set; }
  63. /// <summary>
  64. /// Currency used to pay the transaction.
  65. /// </summary>
  66. public virtual Currency Currency { get; set; }
  67. /// <summary>
  68. /// POS Transaction status.
  69. /// </summary>
  70. public PosTrxStatus TransactionStatus { get; set; }
  71. /// <summary>
  72. /// Refund link.
  73. /// </summary>
  74. public Guid? RefundLink { get; set; }
  75. /// <summary>
  76. /// Id of the business unit this transaction is made.
  77. /// </summary>
  78. public Guid BusinessUnitId { get; set; }
  79. /// <summary>
  80. /// Gets or sets which BusinessUnit(typically a site) created this PosTrx.
  81. /// </summary>
  82. public virtual BusinessUnit CreatedFromSite { get; set; }
  83. /// <summary>
  84. /// Site device unique id.
  85. /// </summary>
  86. public Guid SiteDeviceId { get; set; }
  87. /// <summary>
  88. /// Gets or sets which SiteDevice created (by a operator operates on it) this PosTrx.
  89. /// </summary>
  90. public virtual SiteDevice CreatedFromSiteDevice { get; set; }
  91. /// <summary>
  92. /// Additional info regarding the current transaction.
  93. /// </summary>
  94. public string TrxComment { get; set; }
  95. }
  96. }