// <copyright file="Track.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>

#pragma warning disable SA1128 // Put constructor initializers on their own line

namespace Jellyfin.Database.Implementations.Entities.Libraries
{
    using System.Collections.Generic;
    using Jellyfin.Database.Implementations.Interfaces;

    /// <summary>
    /// An entity representing a track.
    /// </summary>
    public class Track : LibraryItem, IHasReleases
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Track"/> class.
        /// </summary>
        /// <param name="library">The library.</param>
        public Track(Library library) : base(library)
        {
            this.Releases = new HashSet<Release>();
            this.TrackMetadata = new HashSet<TrackMetadata>();
        }

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

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

        /// <summary>
        /// Gets a collection containing the track metadata.
        /// </summary>
        public virtual ICollection<TrackMetadata> TrackMetadata { get; private set; }
    }
}
