using System;
using System.Collections.Generic;
using MediaBrowser.Model.Users;
namespace MediaBrowser.Model.Entities
{
///
/// This is a concrete class that the UI can use to deserialize
/// It is flat in the sense that it will be used regardless of the type of BaseItem involved
///
public class ApiBaseItem : BaseItem
{
// TV Series
public string TvdbId { get; set; }
public string Status { get; set; }
public IEnumerable AirDays { get; set; }
public string AirTime { get; set; }
// Movie
public string TmdbId { get; set; }
public string ImdbId { get; set; }
}
///
/// This is the full return object when requesting an Item
///
public class ApiBaseItemWrapper
where T : BaseItem
{
public T Item { get; set; }
public UserItemData UserItemData { get; set; }
public IEnumerable> Children { get; set; }
public bool IsFolder { get; set; }
public Guid? ParentId { get; set; }
public string Type { get; set; }
public bool IsType(Type type)
{
return IsType(type.Name);
}
public bool IsType(string type)
{
return Type.Equals(type, StringComparison.OrdinalIgnoreCase);
}
///
/// If the item does not have a logo, this will hold the Id of the Parent that has one.
///
public Guid? ParentLogoItemId { get; set; }
public Guid? ParentBackdropItemId { get; set; }
public int? ParentBackdropCount { get; set; }
}
}