namespace SharpChat { public class ChannelInfo { public string Name { get; set; } public string Password { get; set; } public bool IsTemporary { get; set; } public int Rank { get; set; } public long OwnerId { get; set; } public bool HasPassword => !string.IsNullOrWhiteSpace(Password); public bool IsPublic => !IsTemporary && Rank < 1 && !HasPassword; public ChannelInfo( string name, string? password = null, bool isTemporary = false, int rank = 0, long ownerId = 0 ) { Name = name; Password = password ?? string.Empty; IsTemporary = isTemporary; Rank = rank; OwnerId = ownerId; } } }