UserDto.cs 4.1 KB

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