UserDto.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. using MediaBrowser.Model.Configuration;
  2. using MediaBrowser.Model.Connect;
  3. using MediaBrowser.Model.Users;
  4. using System;
  5. using MediaBrowser.Model.Serialization;
  6. namespace MediaBrowser.Model.Dto
  7. {
  8. /// <summary>
  9. /// Class UserDto
  10. /// </summary>
  11. public class UserDto : IItemDto, IHasServerId
  12. {
  13. /// <summary>
  14. /// Gets or sets the name.
  15. /// </summary>
  16. /// <value>The name.</value>
  17. public string Name { get; set; }
  18. /// <summary>
  19. /// Gets or sets the server identifier.
  20. /// </summary>
  21. /// <value>The server identifier.</value>
  22. public string ServerId { get; set; }
  23. /// <summary>
  24. /// Gets or sets the name of the server.
  25. /// This is not used by the server and is for client-side usage only.
  26. /// </summary>
  27. /// <value>The name of the server.</value>
  28. public string ServerName { get; set; }
  29. /// <summary>
  30. /// Gets or sets the name of the connect user.
  31. /// </summary>
  32. /// <value>The name of the connect user.</value>
  33. public string ConnectUserName { get; set; }
  34. /// <summary>
  35. /// Gets or sets the connect user identifier.
  36. /// </summary>
  37. /// <value>The connect user identifier.</value>
  38. public string ConnectUserId { get; set; }
  39. /// <summary>
  40. /// Gets or sets the type of the connect link.
  41. /// </summary>
  42. /// <value>The type of the connect link.</value>
  43. public UserLinkType? ConnectLinkType { get; set; }
  44. /// <summary>
  45. /// Gets or sets the id.
  46. /// </summary>
  47. /// <value>The id.</value>
  48. public Guid Id { get; set; }
  49. /// <summary>
  50. /// Gets or sets the primary image tag.
  51. /// </summary>
  52. /// <value>The primary image tag.</value>
  53. public string PrimaryImageTag { get; set; }
  54. /// <summary>
  55. /// Gets or sets a value indicating whether this instance has password.
  56. /// </summary>
  57. /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value>
  58. public bool HasPassword { get; set; }
  59. /// <summary>
  60. /// Gets or sets a value indicating whether this instance has configured password.
  61. /// </summary>
  62. /// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value>
  63. public bool HasConfiguredPassword { get; set; }
  64. /// <summary>
  65. /// Gets or sets a value indicating whether this instance has configured easy password.
  66. /// </summary>
  67. /// <value><c>true</c> if this instance has configured easy password; otherwise, <c>false</c>.</value>
  68. public bool HasConfiguredEasyPassword { get; set; }
  69. public bool? EnableAutoLogin { get; set; }
  70. /// <summary>
  71. /// Gets or sets the last login date.
  72. /// </summary>
  73. /// <value>The last login date.</value>
  74. public DateTime? LastLoginDate { get; set; }
  75. /// <summary>
  76. /// Gets or sets the last activity date.
  77. /// </summary>
  78. /// <value>The last activity date.</value>
  79. public DateTime? LastActivityDate { get; set; }
  80. /// <summary>
  81. /// Gets or sets the configuration.
  82. /// </summary>
  83. /// <value>The configuration.</value>
  84. public UserConfiguration Configuration { get; set; }
  85. /// <summary>
  86. /// Gets or sets the policy.
  87. /// </summary>
  88. /// <value>The policy.</value>
  89. public UserPolicy Policy { get; set; }
  90. /// <summary>
  91. /// Gets or sets the primary image aspect ratio.
  92. /// </summary>
  93. /// <value>The primary image aspect ratio.</value>
  94. public double? PrimaryImageAspectRatio { get; set; }
  95. /// <summary>
  96. /// Initializes a new instance of the <see cref="UserDto"/> class.
  97. /// </summary>
  98. public UserDto()
  99. {
  100. Configuration = new UserConfiguration();
  101. Policy = new UserPolicy();
  102. }
  103. public override string ToString()
  104. {
  105. return Name ?? base.ToString();
  106. }
  107. }
  108. }