IM/backend/IM_API/Models/Message.cs
nanxun e7dbb651a2 前端:
1、会话列表、消息界面展示与后端打通
后端:
1、修复会话和消息服务现存问题
2、会话对象不再返回Message对象,而是使用MessageBaseDto替代
3、修改查询会话列表和会话信息的逻辑
4、新增消息列表查询
文档:
后端代码规范文档新增从数据库同步到模型的命令
2026-01-18 22:32:55 +08:00

63 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
namespace IM_API.Models;
public partial class Message
{
public int Id { get; set; }
/// <summary>
/// 聊天类型
/// 0私聊,1群聊
/// </summary>
public sbyte ChatType { get; set; }
/// <summary>
/// 消息类型
/// (0:文本,1图片,2语音,3视频,4文件5语音聊天,6视频聊天)
/// </summary>
public sbyte MsgType { get; set; }
/// <summary>
/// 消息内容
/// </summary>
public string Content { get; set; } = null!;
/// <summary>
/// 发送者
/// </summary>
public int Sender { get; set; }
/// <summary>
/// 接收者私聊为用户ID群聊为群聊ID
/// </summary>
public int Recipient { get; set; }
/// <summary>
/// 消息状态(0:已发送,1:已撤回)
/// </summary>
public sbyte State { get; set; }
/// <summary>
/// 发送时间
/// </summary>
public DateTime Created { get; set; }
/// <summary>
/// 消息推送唯一标识符
/// </summary>
public string StreamKey { get; set; } = null!;
/// <summary>
/// 若为群消息则表示具体的成员id
/// </summary>
public int? GroupMemberId { get; set; }
public virtual ICollection<Conversation> Conversations { get; set; } = new List<Conversation>();
public virtual ICollection<File> Files { get; set; } = new List<File>();
public virtual User SenderNavigation { get; set; } = null!;
}