Files
zap-stream-api/NostrStreamer/Database/UserStream.cs
2023-08-01 23:08:57 +01:00

49 lines
1.1 KiB
C#

namespace NostrStreamer.Database;
public class UserStream
{
public Guid Id { get; init; } = Guid.NewGuid();
public string PubKey { get; init; } = null!;
public User User { get; init; } = null!;
public string StreamId { get; init; } = null!;
public DateTime Starts { get; init; } = DateTime.UtcNow;
public DateTime? Ends { get; set; }
public UserStreamState State { get; set; }
/// <summary>
/// Nostr Event for this stream
/// </summary>
public string Event { get; set; } = null!;
/// <summary>
/// URL of auto-generated thumbnail
/// </summary>
public string? Thumbnail { get; set; }
public Guid EndpointId { get; init; }
public IngestEndpoint Endpoint { get; init; } = null!;
/// <summary>
/// Publisher edge IP
/// </summary>
public string EdgeIp { get; set; } = null!;
/// <summary>
/// Publisher edge client id
/// </summary>
public string ForwardClientId { get; set; } = null!;
public List<UserStreamGuest> Guests { get; init; } = new();
}
public enum UserStreamState
{
Planned = 1,
Live = 2,
Ended = 3
}