using SqlSugar;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;
using Yi.Framework.Core.Data;
namespace Yi.Framework.Stock.Domain.Entities
{
///
/// 股市新闻聚合根实体
///
///
/// 用于记录影响股市波动的新闻事件
///
[SugarTable("Stock_News")]
public class StockNewsAggregateRoot : AggregateRoot, ISoftDelete, IAuditedObject, IOrderNum
{
///
/// 逻辑删除
///
public bool IsDeleted { get; set; }
///
/// 创建时间
///
public DateTime CreationTime { get; set; }
///
/// 创建者ID
///
public Guid? CreatorId { get; set; }
///
/// 最后修改时间
///
public DateTime? LastModificationTime { get; set; }
///
/// 最后修改者ID
///
public Guid? LastModifierId { get; set; }
///
/// 排序号
///
public int OrderNum { get; set; } = 0;
///
/// 新闻标题
///
public string Title { get; set; } = string.Empty;
///
/// 新闻内容
///
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string Content { get; set; } = string.Empty;
///
/// 发布时间
///
public DateTime PublishTime { get; set; }
///
/// 新闻来源
///
public string Source { get; set; } = string.Empty;
///
/// 新闻摘要
///
public string Summary { get; set; } = string.Empty;
public StockNewsAggregateRoot() { }
public StockNewsAggregateRoot(
string title,
string content,
string source = "")
{
Title = title;
Content = content;
Source = source;
PublishTime = DateTime.Now;
}
}
}