Person.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using MediaBrowser.Model.Dto;
  2. using System.Collections.Generic;
  3. using System.Runtime.Serialization;
  4. namespace MediaBrowser.Controller.Entities
  5. {
  6. /// <summary>
  7. /// This is the full Person object that can be retrieved with all of it's data.
  8. /// </summary>
  9. public class Person : BaseItem, IItemByName
  10. {
  11. public Person()
  12. {
  13. UserItemCountList = new List<ItemByNameCounts>();
  14. }
  15. /// <summary>
  16. /// Gets or sets the place of birth.
  17. /// </summary>
  18. /// <value>The place of birth.</value>
  19. public string PlaceOfBirth { get; set; }
  20. [IgnoreDataMember]
  21. public List<ItemByNameCounts> UserItemCountList { get; set; }
  22. /// <summary>
  23. /// Gets the user data key.
  24. /// </summary>
  25. /// <returns>System.String.</returns>
  26. public override string GetUserDataKey()
  27. {
  28. return "Person-" + Name;
  29. }
  30. }
  31. /// <summary>
  32. /// This is the small Person stub that is attached to BaseItems
  33. /// </summary>
  34. public class PersonInfo
  35. {
  36. /// <summary>
  37. /// Gets or sets the name.
  38. /// </summary>
  39. /// <value>The name.</value>
  40. public string Name { get; set; }
  41. /// <summary>
  42. /// Gets or sets the role.
  43. /// </summary>
  44. /// <value>The role.</value>
  45. public string Role { get; set; }
  46. /// <summary>
  47. /// Gets or sets the type.
  48. /// </summary>
  49. /// <value>The type.</value>
  50. public string Type { get; set; }
  51. /// <summary>
  52. /// Gets or sets the sort order - ascending
  53. /// </summary>
  54. /// <value>The sort order.</value>
  55. public int? SortOrder { get; set; }
  56. /// <summary>
  57. /// Returns a <see cref="System.String" /> that represents this instance.
  58. /// </summary>
  59. /// <returns>A <see cref="System.String" /> that represents this instance.</returns>
  60. public override string ToString()
  61. {
  62. return Name;
  63. }
  64. }
  65. }