using System.Collections.Generic; using Kyoo.Models.Attributes; namespace Kyoo.Models { [ComposedSlug] public class Season : IResource { [JsonIgnore] public int ID { get; set; } [JsonIgnore] public int ShowID { get; set; } public int SeasonNumber { get; set; } = -1; public string Slug => Show != null ? $"{Show.Slug}-s{SeasonNumber}" : ID.ToString(); public string Title { get; set; } public string Overview { get; set; } public int? Year { get; set; } [JsonIgnore] public string Poster { get; set; } [EditableRelation] public virtual IEnumerable ExternalIDs { get; set; } [JsonIgnore] public virtual Show Show { get; set; } [JsonIgnore] public virtual IEnumerable Episodes { get; set; } public Season() { } public Season(int showID, int seasonNumber, string title, string overview, int? year, string poster, IEnumerable externalIDs) { ShowID = showID; SeasonNumber = seasonNumber; Title = title; Overview = overview; Year = year; Poster = poster; ExternalIDs = externalIDs; } } }