#pragma warning disable CA1711 // Identifiers should not have incorrect suffix using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Data.Interfaces; namespace Jellyfin.Data.Entities.Libraries { /// /// An entity representing a stream in a media file. /// public class MediaFileStream : IHasConcurrencyToken { /// /// Initializes a new instance of the class. /// /// The number of this stream. public MediaFileStream(int streamNumber) { StreamNumber = streamNumber; } /// /// Gets the id. /// /// /// Identity, Indexed, Required. /// [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; private set; } /// /// Gets or sets the stream number. /// /// /// Required. /// public int StreamNumber { get; set; } /// [ConcurrencyCheck] public uint RowVersion { get; private set; } /// public void OnSavingChanges() { RowVersion++; } } }