28 lines
1 KiB
C#
28 lines
1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace GsDChat.Core.Models;
|
|
|
|
public static class ChannelTypes
|
|
{
|
|
public const string Channel = "Channel";
|
|
public const string DirectMessage = "DM";
|
|
public const string Group = "Group";
|
|
}
|
|
|
|
public class Channel
|
|
{
|
|
public string Id { get; set; } = Guid.NewGuid().ToString("N");
|
|
public string Name { get; set; } = string.Empty;
|
|
public string Topic { get; set; } = string.Empty;
|
|
public string Type { get; set; } = ChannelTypes.Channel;
|
|
public bool IsPrivate { get; set; } = false;
|
|
public bool IsE2ee { get; set; } = false;
|
|
public string CreatorId { get; set; } = string.Empty;
|
|
public int MaxUsers { get; set; } = 0;
|
|
public string AllowedRoles { get; set; } = string.Empty; // Comma-separated or empty for public
|
|
public List<string> MemberIds { get; set; } = new();
|
|
public List<string> MemberUsernames { get; set; } = new();
|
|
public Dictionary<string, string> MemberPublicKeys { get; set; } = new();
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|