2019-06-01 13:40:01 -07:00
|
|
|
using System;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
2020-08-29 10:30:09 -07:00
|
|
|
namespace Jellyfin.Data.Entities.Libraries
|
2019-06-01 13:40:01 -07:00
|
|
|
{
|
2020-08-30 15:50:54 -07:00
|
|
|
/// <summary>
|
|
|
|
/// An entity that holds metadata for seasons.
|
|
|
|
/// </summary>
|
2020-09-01 08:38:09 -07:00
|
|
|
public class SeasonMetadata : ItemMetadata
|
2020-05-02 14:56:05 -07:00
|
|
|
{
|
|
|
|
/// <summary>
|
2020-08-30 15:50:54 -07:00
|
|
|
/// Initializes a new instance of the <see cref="SeasonMetadata"/> class.
|
2020-05-02 14:56:05 -07:00
|
|
|
/// </summary>
|
2020-06-19 03:21:49 -07: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-30 15:50:54 -07:00
|
|
|
/// <param name="season">The season.</param>
|
|
|
|
public SeasonMetadata(string title, string language, Season season) : base(title, language)
|
2020-05-02 14:56:05 -07:00
|
|
|
{
|
2020-08-30 15:50:54 -07:00
|
|
|
if (season == null)
|
2020-06-20 01:35:29 -07:00
|
|
|
{
|
2020-08-30 15:50:54 -07:00
|
|
|
throw new ArgumentNullException(nameof(season));
|
2020-06-20 01:35:29 -07:00
|
|
|
}
|
2020-05-02 14:56:05 -07:00
|
|
|
|
2020-08-30 15:50:54 -07:00
|
|
|
season.SeasonMetadata.Add(this);
|
2020-05-02 14:56:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
2020-08-30 15:50:54 -07:00
|
|
|
/// Initializes a new instance of the <see cref="SeasonMetadata"/> class.
|
2020-05-02 14:56:05 -07:00
|
|
|
/// </summary>
|
2020-08-30 15:50:54 -07:00
|
|
|
/// <remarks>
|
|
|
|
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
|
|
|
/// </remarks>
|
|
|
|
protected SeasonMetadata()
|
2020-05-02 14:56:05 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
2020-08-30 15:50:54 -07:00
|
|
|
/// Gets or sets the outline.
|
2020-05-02 14:56:05 -07:00
|
|
|
/// </summary>
|
2020-08-30 15:50:54 -07:00
|
|
|
/// <remarks>
|
|
|
|
/// Max length = 1024.
|
|
|
|
/// </remarks>
|
2020-05-02 14:56:05 -07:00
|
|
|
[MaxLength(1024)]
|
|
|
|
[StringLength(1024)]
|
2020-08-30 15:50:54 -07:00
|
|
|
public string Outline { get; set; }
|
2020-05-02 14:56:05 -07:00
|
|
|
}
|
2019-06-01 13:40:01 -07:00
|
|
|
}
|