This commit is contained in:
Jamie.Rees 2017-06-13 14:05:23 +01:00
commit 515312427e
7 changed files with 43 additions and 55 deletions

View file

@ -44,7 +44,7 @@ namespace Ombi.Store.Entities
/// <summary>
/// Only used for TV Shows
/// </summary>
public virtual ICollection<SeasonsContent> Seasons { get; set; }
public virtual ICollection<PlexSeasonsContent> Seasons { get; set; }
/// <summary>
/// Plex's internal ID for this item
@ -53,7 +53,8 @@ namespace Ombi.Store.Entities
public DateTime AddedAt { get; set; }
}
public class SeasonsContent : Entity
[Table("PlexSeasonsContent")]
public class PlexSeasonsContent : Entity
{
public int PlexContentId { get; set; }
public int SeasonNumber { get; set; }

View file

@ -0,0 +1,15 @@
using System;
namespace Ombi.Store.Entities
{
public class RequestHistory : Entity
{
public int UserId { get; set; }
public RequestType Type { get; set; }
public DateTime RequestedDate { get; set; }
public int RequestId { get; set; }
public virtual RequestBlobs Request { get; set; }
public virtual User User { get; set; }
}
}

View file

@ -23,9 +23,10 @@ CREATE TABLE IF NOT EXISTS RadarrCache
TheMovieDbId INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS SeasonsContent
CREATE TABLE IF NOT EXISTS PlexSeasonsContent
(
Id INTEGER PRIMARY KEY AUTOINCREMENT,
PlexContentId integer not null,
SeasonNumber INTEGER NOT NULL,
SeasonKey INTEGER NOT NULL,
ParentKey INTEGER NOT NULL
@ -52,4 +53,14 @@ CREATE TABLE IF NOT EXISTS Users
Salt BLOB NULL,
UserType INTEGER NOT NULL
);
);
CREATE TABLE IF NOT EXISTS RequestHistory
{
Id INTEGER PRIMARY KEY AUTOINCREMENT,
Type INTEGER NOT NULL,
RequestedDate varchar(50) NOT NULL,
RequestId INTEGER NOT NULL
}