Reworked the TV model AGAIN #865

This commit is contained in:
Jamie.Rees 2017-05-16 16:09:06 +01:00
parent 25526cc4d9
commit 1b5698b3ca
10 changed files with 141 additions and 114 deletions

View file

@ -1,4 +1,6 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Ombi.Store.Entities;
namespace Ombi.Core.Models.Requests
{
@ -6,23 +8,13 @@ namespace Ombi.Core.Models.Requests
{
public TvRequestModel()
{
SeasonRequests = new List<SeasonRequestModel>();
ChildRequests = new List<TvRequestModel>();
ChildRequests = new List<ChildTvRequest>();
}
public string ImdbId { get; set; }
public string TvDbId { get; set; }
public bool RequestAll { get; set; }
public List<SeasonRequestModel> SeasonRequests { get; set; }
/// <summary>
/// This is for TV requests, If there is more than 1 request for a show then it should be a child
/// e.g. Request 1 is for Season 1, Request 2 is for season 5. There should be two child items.
/// </summary>
public List<TvRequestModel> ChildRequests { get; set; }
public bool HasChildRequests => ChildRequests.Count > 0;
public List<ChildTvRequest> ChildRequests { get; set; }
/// <summary>
/// For TV Shows with a custom root folder
/// </summary>
@ -31,4 +23,11 @@ namespace Ombi.Core.Models.Requests
/// </value>
public int RootFolderSelected { get; set; }
}
public class ChildTvRequest : BaseRequestModel
{
public bool RequestAll { get; set; }
public List<SeasonRequestModel> SeasonRequests { get; set; } = new List<SeasonRequestModel>();
}
}