using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using Abp.Timing;
namespace Abp.Notifications
{
///
/// Used to store a user notification.
///
[Serializable]
[Table("AbpUserNotifications")]
public class UserNotificationInfo : Entity, IHasCreationTime, IMayHaveTenant
{
///
/// Tenant Id.
///
public virtual int? TenantId { get; set; }
///
/// User Id.
///
public virtual long UserId { get; set; }
///
/// Notification Id.
///
[Required]
public virtual Guid TenantNotificationId { get; set; }
///
/// Current state of the user notification.
///
public virtual UserNotificationState State { get; set; }
public virtual DateTime CreationTime { get; set; }
public UserNotificationInfo()
{
}
///
/// Initializes a new instance of the class.
///
///
public UserNotificationInfo(Guid id)
{
Id = id;
State = UserNotificationState.Unread;
CreationTime = Clock.Now;
}
}
}