PosMop.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.ComponentModel.DataAnnotations;
  4. namespace Dfs.WayneChina.PosModelMini
  5. {
  6. public class PosMop
  7. {
  8. /// <summary>
  9. /// as a special mop, define its name to `Cash`
  10. /// </summary>
  11. public const string CASH_MOP_NAME = "Cash";
  12. /// <summary>
  13. /// as a special mop, define its paymentId to 1
  14. /// </summary>
  15. public const int CASH_MOP_PAYMENT_ID = 1;
  16. /// <summary>
  17. /// Unique id of the POS MOP.
  18. /// </summary>
  19. public Guid Id { get; set; }
  20. /// <summary>
  21. /// Name of the POS MOP.
  22. /// </summary>
  23. [Required]
  24. [MaxLength(60)]
  25. public string Name { get; set; }
  26. /// <summary>
  27. /// Payment ID.
  28. /// </summary>
  29. [Required]
  30. public int PaymentId { get; set; }
  31. /// <summary>
  32. /// Gets or sets the datetime when this Mop created and saved into database.
  33. /// normally this time should be automatically set at the saving time (to db).
  34. /// </summary>
  35. public DateTime CreatedDateTime { get; set; }
  36. /// <summary>
  37. /// for keep all history item, import this version
  38. /// </summary>
  39. public Guid ChangesetId { get; set; }
  40. /// <summary>
  41. /// References the change set.
  42. /// </summary>
  43. public virtual Changeset Changeset { get; set; }
  44. /// <summary>
  45. /// Target business unit id.
  46. /// </summary>
  47. public virtual Guid? TargetBusinessUnitId { get; set; }
  48. /// <summary>
  49. /// Gets or sets which BusinessUnit this Mop will perform on.
  50. /// </summary>
  51. public virtual BusinessUnit TargetBusinessUnit { get; set; }
  52. /// <summary>
  53. /// Display name of the POS MOP.
  54. /// </summary>
  55. public string DisplayName { get; set; }
  56. }
  57. }