aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs
blob: 7cb71f06d9ed75456a85e18f78621c02b7d0b823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.Collections.Generic;
using Jellyfin.Database.Implementations.Interfaces;

namespace Jellyfin.Database.Implementations.Entities.Libraries
{
    /// <summary>
    /// An entity representing an episode.
    /// </summary>
    public class Episode : LibraryItem, IHasReleases
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Episode"/> class.
        /// </summary>
        /// <param name="library">The library.</param>
        public Episode(Library library) : base(library)
        {
            Releases = new HashSet<Release>();
            EpisodeMetadata = new HashSet<EpisodeMetadata>();
        }

        /// <summary>
        /// Gets or sets the episode number.
        /// </summary>
        public int? EpisodeNumber { get; set; }

        /// <inheritdoc />
        public virtual ICollection<Release> Releases { get; private set; }

        /// <summary>
        /// Gets a collection containing the metadata for this episode.
        /// </summary>
        public virtual ICollection<EpisodeMetadata> EpisodeMetadata { get; private set; }
    }
}