namespace TeleWave.Domain.Library;
/// Шоу в составе коллекции. Порядок показа — по .
public class CollectionItem
{
public Guid Id { get; private set; }
public Guid CollectionId { get; private set; }
public Guid ShowId { get; private set; }
/// Порядковый номер внутри коллекции (может иметь разрывы после удалений).
public int Position { get; private set; }
private CollectionItem() { }
internal static CollectionItem Create(Guid collectionId, Guid showId, int position) =>
new()
{
Id = Guid.NewGuid(),
CollectionId = collectionId,
ShowId = showId,
Position = position,
};
internal void SetPosition(int position) => Position = position;
}