2012-07-12 06:55:27 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Users
|
|
|
|
|
{
|
2012-08-12 23:57:54 +00:00
|
|
|
|
public class User : BaseEntity
|
2012-07-12 06:55:27 +00:00
|
|
|
|
{
|
|
|
|
|
public string MaxParentalRating { get; set; }
|
|
|
|
|
|
|
|
|
|
private Dictionary<Guid, UserItemData> _ItemData = new Dictionary<Guid, UserItemData>();
|
|
|
|
|
public Dictionary<Guid, UserItemData> ItemData { get { return _ItemData; } set { _ItemData = value; } }
|
2012-08-17 16:47:35 +00:00
|
|
|
|
|
|
|
|
|
public int RecentItemDays { get; set; }
|
|
|
|
|
|
|
|
|
|
public User()
|
|
|
|
|
{
|
|
|
|
|
RecentItemDays = 14;
|
|
|
|
|
}
|
2012-08-17 17:37:26 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets user data for an item, if there is any
|
|
|
|
|
/// </summary>
|
|
|
|
|
public UserItemData GetItemData(Guid itemId)
|
|
|
|
|
{
|
|
|
|
|
if (ItemData.ContainsKey(itemId))
|
|
|
|
|
{
|
|
|
|
|
return ItemData[itemId];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
2012-07-12 06:55:27 +00:00
|
|
|
|
}
|
|
|
|
|
}
|