UserDto.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System.ComponentModel;
  2. using MediaBrowser.Model.Configuration;
  3. using ProtoBuf;
  4. using System;
  5. using System.Runtime.Serialization;
  6. namespace MediaBrowser.Model.Dto
  7. {
  8. /// <summary>
  9. /// Class UserDto
  10. /// </summary>
  11. [ProtoContract]
  12. public class UserDto : INotifyPropertyChanged
  13. {
  14. /// <summary>
  15. /// Gets or sets the name.
  16. /// </summary>
  17. /// <value>The name.</value>
  18. [ProtoMember(1)]
  19. public string Name { get; set; }
  20. /// <summary>
  21. /// Gets or sets the id.
  22. /// </summary>
  23. /// <value>The id.</value>
  24. [ProtoMember(2)]
  25. public Guid Id { get; set; }
  26. /// <summary>
  27. /// Gets or sets the primary image tag.
  28. /// </summary>
  29. /// <value>The primary image tag.</value>
  30. [ProtoMember(3)]
  31. public Guid? PrimaryImageTag { get; set; }
  32. /// <summary>
  33. /// Gets or sets a value indicating whether this instance has password.
  34. /// </summary>
  35. /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value>
  36. [ProtoMember(4)]
  37. public bool HasPassword { get; set; }
  38. /// <summary>
  39. /// Gets or sets the last login date.
  40. /// </summary>
  41. /// <value>The last login date.</value>
  42. [ProtoMember(5)]
  43. public DateTime? LastLoginDate { get; set; }
  44. /// <summary>
  45. /// Gets or sets the last activity date.
  46. /// </summary>
  47. /// <value>The last activity date.</value>
  48. [ProtoMember(6)]
  49. public DateTime? LastActivityDate { get; set; }
  50. /// <summary>
  51. /// Gets or sets the configuration.
  52. /// </summary>
  53. /// <value>The configuration.</value>
  54. [ProtoMember(7)]
  55. public UserConfiguration Configuration { get; set; }
  56. /// <summary>
  57. /// Gets a value indicating whether this instance has primary image.
  58. /// </summary>
  59. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  60. [IgnoreDataMember]
  61. public bool HasPrimaryImage
  62. {
  63. get { return PrimaryImageTag.HasValue; }
  64. }
  65. public event PropertyChangedEventHandler PropertyChanged;
  66. }
  67. }