/***********************************************************************
* Project: CoreCms
* ProjectName: 核心内容管理系统
* Web: https://www.corecms.net
* Author: 大灰灰
* Email: jianweie@163.com
* CreateTime: 2025/12/7
* Description: 站内信消息表
***********************************************************************/
using SqlSugar;
using System.ComponentModel.DataAnnotations;
namespace CoreCms.Net.Model.Entities
{
///
/// 站内信消息表
///
[SugarTable("SQMessage", TableDescription = "站内信消息表")]
public partial class SQMessage
{
///
/// 构造函数
///
public SQMessage()
{
}
///
/// 消息ID
///
[Display(Name = "消息ID")]
[SugarColumn(ColumnDescription = "消息ID", IsPrimaryKey = true, IsIdentity = true)]
[Required(ErrorMessage = "请输入{0}")]
public System.Int32 id { get; set; }
///
/// 接收用户ID,全员广播时为NULL
///
[Display(Name = "接收用户ID")]
[SugarColumn(ColumnDescription = "接收用户ID,全员广播时为NULL", IsNullable = true)]
public System.Int32? user_id { get; set; }
///
/// 目标类型:0=指定用户,1=全员广播
///
[Display(Name = "目标类型")]
[SugarColumn(ColumnDescription = "目标类型:0=指定用户,1=全员广播")]
[Required(ErrorMessage = "请输入{0}")]
public System.Int32 target_type { get; set; }
///
/// 消息标题
///
[Display(Name = "消息标题")]
[SugarColumn(ColumnDescription = "消息标题")]
[Required(ErrorMessage = "请输入{0}")]
[StringLength(200, ErrorMessage = "【{0}】不能超过{1}字符长度")]
public System.String title { get; set; }
///
/// 消息正文
///
[Display(Name = "消息正文")]
[SugarColumn(ColumnDescription = "消息正文", ColumnDataType = "nvarchar(max)")]
[Required(ErrorMessage = "请输入{0}")]
public System.String content { get; set; }
///
/// 消息类型:0=系统通知,1=私信
///
[Display(Name = "消息类型")]
[SugarColumn(ColumnDescription = "消息类型:0=系统通知,1=私信")]
[Required(ErrorMessage = "请输入{0}")]
public System.Int32 message_type { get; set; }
///
/// 是否已读(仅对指定用户消息有效)
///
[Display(Name = "是否已读")]
[SugarColumn(ColumnDescription = "是否已读")]
[Required(ErrorMessage = "请输入{0}")]
public System.Boolean is_read { get; set; }
///
/// 发送者ID(后台管理员ID)
///
[Display(Name = "发送者ID")]
[SugarColumn(ColumnDescription = "发送者ID", IsNullable = true)]
public System.Int32? sender_id { get; set; }
///
/// 关联业务类型:1=组局
///
[Display(Name = "关联业务类型")]
[SugarColumn(ColumnDescription = "关联业务类型", IsNullable = true)]
public System.Int32? related_type { get; set; }
///
/// 关联业务ID
///
[Display(Name = "关联业务ID")]
[SugarColumn(ColumnDescription = "关联业务ID", IsNullable = true)]
public System.Int32? related_id { get; set; }
///
/// 创建时间
///
[Display(Name = "创建时间")]
[SugarColumn(ColumnDescription = "创建时间")]
[Required(ErrorMessage = "请输入{0}")]
public System.DateTime created_at { get; set; }
///
/// 更新时间
///
[Display(Name = "更新时间")]
[SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
public System.DateTime? updated_at { get; set; }
}
}