2019-06-01 22:40:01 +02:00
|
|
|
using System;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
2020-08-29 19:30:09 +02:00
|
|
|
namespace Jellyfin.Data.Entities.Libraries
|
2019-06-01 22:40:01 +02:00
|
|
|
{
|
2020-08-31 00:50:54 +02:00
|
|
|
/// <summary>
|
|
|
|
/// An entity containing metadata for an <see cref="Episode"/>.
|
|
|
|
/// </summary>
|
2020-09-01 17:38:09 +02:00
|
|
|
public class EpisodeMetadata : ItemMetadata
|
2020-05-02 23:56:05 +02:00
|
|
|
{
|
|
|
|
/// <summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// Initializes a new instance of the <see cref="EpisodeMetadata"/> class.
|
2020-05-02 23:56:05 +02:00
|
|
|
/// </summary>
|
2020-06-19 12:21:49 +02:00
|
|
|
/// <param name="title">The title or name of the object.</param>
|
|
|
|
/// <param name="language">ISO-639-3 3-character language codes.</param>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// <param name="episode">The episode.</param>
|
|
|
|
public EpisodeMetadata(string title, string language, Episode episode) : base(title, language)
|
2020-05-02 23:56:05 +02:00
|
|
|
{
|
2020-08-31 00:50:54 +02:00
|
|
|
if (episode == null)
|
2020-06-20 10:35:29 +02:00
|
|
|
{
|
2020-08-31 00:50:54 +02:00
|
|
|
throw new ArgumentNullException(nameof(episode));
|
2020-06-20 10:35:29 +02:00
|
|
|
}
|
|
|
|
|
2020-08-31 00:50:54 +02:00
|
|
|
episode.EpisodeMetadata.Add(this);
|
2020-05-02 23:56:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// Initializes a new instance of the <see cref="EpisodeMetadata"/> class.
|
2020-05-02 23:56:05 +02:00
|
|
|
/// </summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// <remarks>
|
|
|
|
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
|
|
|
/// </remarks>
|
|
|
|
protected EpisodeMetadata()
|
2020-05-02 23:56:05 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// Gets or sets the outline.
|
2020-05-02 23:56:05 +02:00
|
|
|
/// </summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// <remarks>
|
|
|
|
/// Max length = 1024.
|
|
|
|
/// </remarks>
|
2020-05-02 23:56:05 +02:00
|
|
|
[MaxLength(1024)]
|
|
|
|
[StringLength(1024)]
|
2020-08-31 00:50:54 +02:00
|
|
|
public string Outline { get; set; }
|
2020-05-02 23:56:05 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// Gets or sets the plot.
|
2020-05-02 23:56:05 +02:00
|
|
|
/// </summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// <remarks>
|
|
|
|
/// Max length = 65535.
|
|
|
|
/// </remarks>
|
2020-05-02 23:56:05 +02:00
|
|
|
[MaxLength(65535)]
|
|
|
|
[StringLength(65535)]
|
2020-08-31 00:50:54 +02:00
|
|
|
public string Plot { get; set; }
|
2020-05-02 23:56:05 +02:00
|
|
|
|
|
|
|
/// <summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// Gets or sets the tagline.
|
2020-05-02 23:56:05 +02:00
|
|
|
/// </summary>
|
2020-08-31 00:50:54 +02:00
|
|
|
/// <remarks>
|
|
|
|
/// Max length = 1024.
|
|
|
|
/// </remarks>
|
2020-05-02 23:56:05 +02:00
|
|
|
[MaxLength(1024)]
|
|
|
|
[StringLength(1024)]
|
2020-08-31 00:50:54 +02:00
|
|
|
public string Tagline { get; set; }
|
2020-05-02 23:56:05 +02:00
|
|
|
}
|
2019-06-01 22:40:01 +02:00
|
|
|
}
|