using System;
using System.Collections.Concurrent;
namespace WatchParty.Parties
{
///
/// A watch party: a join code, the item everyone's meant to be watching,
/// and the set of members being kept in sync. See docs/architecture.md.
///
public class Party
{
public Guid Id { get; set; } = Guid.NewGuid();
/// Short human-typeable code used to join, e.g. "K7QX2P".
public string JoinCode { get; set; }
/// The library item everyone is meant to be watching. Emby's own
/// item/user ids are plain strings on this SDK version (confirmed by
/// building against the real MediaBrowser.Model assembly) - only Party.Id
/// itself (below) is a Guid we mint ourselves.
public string ItemId { get; set; }
public string HostUserId { get; set; }
///
/// Whose reported position is treated as ground truth. Defaults to the
/// host, but falls back to whoever's left if the host leaves (see
/// PartyManager.Leave).
///
public string ReferenceUserId { get; set; }
public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
public ConcurrentDictionary Members { get; } = new ConcurrentDictionary();
public DateTime LastActivityUtc { get; set; } = DateTime.UtcNow;
}
}