#pragma warning disable CA2227
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Jellyfin.Data.Interfaces;
namespace Jellyfin.Data.Entities.Libraries
{
///
/// An entity representing series metadata.
///
public class SeriesMetadata : ItemMetadata, IHasCompanies
{
///
/// Initializes a new instance of the class.
///
/// The title or name of the object.
/// ISO-639-3 3-character language codes.
/// The series.
public SeriesMetadata(string title, string language, Series series) : base(title, language)
{
if (series == null)
{
throw new ArgumentNullException(nameof(series));
}
series.SeriesMetadata.Add(this);
Networks = new HashSet();
}
///
/// Initializes a new instance of the class.
///
///
/// Default constructor. Protected due to required properties, but present because EF needs it.
///
protected SeriesMetadata()
{
}
///
/// Gets or sets the outline.
///
///
/// Max length = 1024.
///
[MaxLength(1024)]
[StringLength(1024)]
public string Outline { get; set; }
///
/// Gets or sets the plot.
///
///
/// Max length = 65535.
///
[MaxLength(65535)]
[StringLength(65535)]
public string Plot { get; set; }
///
/// Gets or sets the tagline.
///
///
/// Max length = 1024.
///
[MaxLength(1024)]
[StringLength(1024)]
public string Tagline { get; set; }
///
/// Gets or sets the country code.
///
///
/// Max length = 2.
///
[MaxLength(2)]
[StringLength(2)]
public string Country { get; set; }
///
/// Gets or sets a collection containing the networks.
///
public virtual ICollection Networks { get; protected set; }
///
[NotMapped]
public ICollection Companies => Networks;
}
}