SiteDevice.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. namespace Dfs.WayneChina.PosModelMini
  4. {
  5. public class SiteDevice
  6. {
  7. /// <summary>
  8. /// Unique id of the site device.
  9. /// </summary>
  10. public Guid Id { get; set; }
  11. /// <summary>
  12. /// Site device type.
  13. /// </summary>
  14. public SiteDeviceType DeviceType { get; set; }
  15. /// <summary>
  16. /// Description of the site device.
  17. /// </summary>
  18. public string Description { get; set; }
  19. /// <summary>
  20. /// Brand of the site device, such as Sunmi.
  21. /// </summary>
  22. [MaxLength(100)]
  23. public string Brand { get; set; }
  24. /// <summary>
  25. /// like Summi T1 or Summi V1.
  26. /// </summary>
  27. [MaxLength(100)]
  28. public string Model { get; set; }
  29. /// <summary>
  30. /// An id string which correlated with Device hardware, should be global unique, and could not be changed.
  31. /// server may use this to authenticate a device.
  32. /// </summary>
  33. public string HardwareIdentity { get; set; }
  34. /// <summary>
  35. /// Use this field as the argument of only POS device,
  36. /// and will be passed in to talk with FDC server,
  37. /// so this value must be unique in one site(one fusion per site).
  38. /// </summary>
  39. public string PosDeviceFdcClientId { get; set; }
  40. /// <summary>
  41. /// Associate this site device to a business unit id.
  42. /// </summary>
  43. public virtual Guid AsSubjectOfBusinessUnitId { get; set; }
  44. /// <summary>
  45. /// A device acts as a subject of a business unit, all other user priviledge control are all
  46. /// based on the device it operates.
  47. /// think about a case, a pos machine belong to a site(businessUnit with type site), and then we can set an
  48. /// user with restricted in this site, then the user restriction is actually checked with the user's log in
  49. /// operation in this pos machine.
  50. /// </summary>
  51. public virtual BusinessUnit AsSubjectOfBusinessUnit { get; set; }
  52. }
  53. }