User.cs 912 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using MediaBrowser.Model.Entities;
  4. namespace MediaBrowser.Model.Users
  5. {
  6. public class User : BaseEntity
  7. {
  8. public string MaxParentalRating { get; set; }
  9. private Dictionary<Guid, UserItemData> _ItemData = new Dictionary<Guid, UserItemData>();
  10. public Dictionary<Guid, UserItemData> ItemData { get { return _ItemData; } set { _ItemData = value; } }
  11. public int RecentItemDays { get; set; }
  12. public User()
  13. {
  14. RecentItemDays = 14;
  15. }
  16. /// <summary>
  17. /// Gets user data for an item, if there is any
  18. /// </summary>
  19. public UserItemData GetItemData(Guid itemId)
  20. {
  21. if (ItemData.ContainsKey(itemId))
  22. {
  23. return ItemData[itemId];
  24. }
  25. return null;
  26. }
  27. }
  28. }