大修改
This commit is contained in:
50
Entity/Social/Chat/ChatChannel.cs
Normal file
50
Entity/Social/Chat/ChatChannel.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using Fantasy.Entitas;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace NB.Chat;
|
||||
|
||||
/// <summary>
|
||||
/// 聊天频道实体
|
||||
/// </summary>
|
||||
public class ChatChannel : Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 频道绑定id
|
||||
/// </summary>
|
||||
[BsonElement("cid")] public long ChannelId;
|
||||
|
||||
/// <summary>
|
||||
/// 频道类型 0.地图 1.工会频道
|
||||
/// </summary>
|
||||
[BsonElement("type")] public uint ChannelType;
|
||||
|
||||
/// <summary>
|
||||
/// 频道名称
|
||||
/// </summary>
|
||||
[BsonElement("name")] public string Name = "";
|
||||
|
||||
/// <summary>
|
||||
/// 频道密码
|
||||
/// </summary>
|
||||
[BsonElement("pass")] public string Password = "";
|
||||
|
||||
/// <summary>
|
||||
/// 创建者
|
||||
/// </summary>
|
||||
[BsonElement("cr")] public long Creator;
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[BsonElement("ct")] public long CreateTime;
|
||||
|
||||
/// <summary>
|
||||
/// 频道地区 0,全球 非0地区 如果是地图频道则表示地图位置
|
||||
/// </summary>
|
||||
[BsonElement("region")] public int Region;
|
||||
|
||||
/// <summary>
|
||||
/// 当前频道在线人数
|
||||
/// </summary>
|
||||
[BsonIgnore] public readonly HashSet<long> Units = new HashSet<long>();
|
||||
}
|
||||
11
Entity/Social/Chat/ChatChannelCenterComponent.cs
Normal file
11
Entity/Social/Chat/ChatChannelCenterComponent.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NB.Chat;
|
||||
|
||||
/// <summary>
|
||||
/// 聊天频道管理
|
||||
/// </summary>
|
||||
public class ChatChannelCenterComponent : Entity
|
||||
{
|
||||
public readonly Dictionary<long, ChatChannel> Channels = new Dictionary<long, ChatChannel>();
|
||||
}
|
||||
Reference in New Issue
Block a user