2
0

UserDto.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using System.ComponentModel;
  2. using MediaBrowser.Model.Configuration;
  3. using System;
  4. using System.Runtime.Serialization;
  5. namespace MediaBrowser.Model.Dto
  6. {
  7. /// <summary>
  8. /// Class UserDto
  9. /// </summary>
  10. public class UserDto : INotifyPropertyChanged, IItemDto
  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 id.
  19. /// </summary>
  20. /// <value>The id.</value>
  21. public string Id { get; set; }
  22. /// <summary>
  23. /// Gets or sets the primary image tag.
  24. /// </summary>
  25. /// <value>The primary image tag.</value>
  26. public Guid? PrimaryImageTag { get; set; }
  27. /// <summary>
  28. /// Gets or sets a value indicating whether this instance has password.
  29. /// </summary>
  30. /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value>
  31. public bool HasPassword { get; set; }
  32. /// <summary>
  33. /// Gets or sets the last login date.
  34. /// </summary>
  35. /// <value>The last login date.</value>
  36. public DateTime? LastLoginDate { get; set; }
  37. /// <summary>
  38. /// Gets or sets the last activity date.
  39. /// </summary>
  40. /// <value>The last activity date.</value>
  41. public DateTime? LastActivityDate { get; set; }
  42. /// <summary>
  43. /// Gets or sets the configuration.
  44. /// </summary>
  45. /// <value>The configuration.</value>
  46. public UserConfiguration Configuration { get; set; }
  47. /// <summary>
  48. /// Gets or sets the primary image aspect ratio.
  49. /// </summary>
  50. /// <value>The primary image aspect ratio.</value>
  51. public double? PrimaryImageAspectRatio { get; set; }
  52. /// <summary>
  53. /// Gets a value indicating whether this instance has primary image.
  54. /// </summary>
  55. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  56. [IgnoreDataMember]
  57. public bool HasPrimaryImage
  58. {
  59. get { return PrimaryImageTag.HasValue; }
  60. }
  61. /// <summary>
  62. /// Initializes a new instance of the <see cref="UserDto"/> class.
  63. /// </summary>
  64. public UserDto()
  65. {
  66. Configuration = new UserConfiguration();
  67. }
  68. /// <summary>
  69. /// Occurs when [property changed].
  70. /// </summary>
  71. public event PropertyChangedEventHandler PropertyChanged;
  72. }
  73. }