campus-errand/server/Models/SystemMessage.cs
2026-03-01 05:01:47 +08:00

33 lines
828 B
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.ComponentModel.DataAnnotations;
namespace CampusErrand.Models;
/// <summary>
/// 系统消息表
/// </summary>
public class SystemMessage
{
[Key]
public int Id { get; set; }
/// <summary>标题</summary>
[MaxLength(128)]
public string Title { get; set; } = string.Empty;
/// <summary>正文(富文本)</summary>
public string Content { get; set; } = string.Empty;
/// <summary>缩略图</summary>
[MaxLength(512)]
public string? ThumbnailUrl { get; set; }
/// <summary>目标类型</summary>
public MessageTargetType TargetType { get; set; }
/// <summary>指定用户 ID 列表JSON</summary>
public string? TargetUserIds { get; set; }
/// <summary>发布时间</summary>
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}