using System;
namespace Sanhe.Abp.Notifications;
///
/// 通知信息
///
public class NotificationInfo
{
///
/// 租户Id
///
public Guid? TenantId { get; set; }
///
/// 名称
///
public string Name { get; set; }
///
/// Id
///
public string Id { get; set; }
///
/// 通知数据
///
public NotificationData Data { get; set; }
///
/// 创建时间
///
public DateTime CreationTime { get; set; }
///
/// 通知存活时间
///
public NotificationLifetime Lifetime { get; set; }
///
/// 通知类型
///
public NotificationType Type { get; set; }
///
/// 通知严重级别
///
public NotificationSeverity Severity { get; set; }
public NotificationInfo()
{
Data = new NotificationData();
Lifetime = NotificationLifetime.Persistent;
Type = NotificationType.Application;
Severity = NotificationSeverity.Info;
CreationTime = DateTime.Now;
}
///
/// 设置Id
///
///
public void SetId(long id)
{
if (Id.IsNullOrWhiteSpace())
{
Id = id.ToString();
}
}
///
/// 获取Id
///
///
public long GetId()
{
return long.Parse(Id);
}
}