using SqlSugar;
using Volo.Abp.Domain.Entities.Auditing;
using Yi.Framework.AiHub.Domain.Shared.Enums;

namespace Yi.Framework.AiHub.Domain.Entities;

/// <summary>
/// 公告日志
/// </summary>
[SugarTable("Ai_Announcement")]
public class AnnouncementAggregateRoot : FullAuditedAggregateRoot<Guid>
{
    public AnnouncementAggregateRoot()
    {
    }
    
    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; set; } = string.Empty;

    /// <summary>
    /// 内容列表（JSON格式存储）
    /// </summary>
    [SugarColumn(IsJson = true, IsNullable = false)]
    public List<string> Content { get; set; } = new List<string>();

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 图片url
    /// </summary>
    public string? ImageUrl { get; set; }
    
    /// <summary>
    /// 开始时间（系统公告时间、活动开始时间）
    /// </summary>
    public DateTime StartTime { get; set; }

    /// <summary>
    /// 活动结束时间
    /// </summary>
    public DateTime? EndTime { get; set; }
    
    /// <summary>
    /// 公告类型（系统、活动）
    /// </summary>
    public AnnouncementTypeEnum Type{ get; set; }

    /// <summary>
    /// 跳转链接
    /// </summary>
    public string? Url { get; set; }
}
