UserDto.cs 3.4 KB

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