mirror of
https://github.com/bitwarden/server.git
synced 2025-04-27 15:52:13 -05:00

* Added notification type enum Added option type to entity * created migration files * made sprocs backward compatible * made sprocs backward compatible * Fixed linting * Altered table to require an optional taskId * formatted code * Added foreignkey * Formatted code * fixed order
30 lines
835 B
C#
30 lines
835 B
C#
#nullable enable
|
|
using System.ComponentModel.DataAnnotations;
|
|
using Bit.Core.Entities;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.NotificationCenter.Enums;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.NotificationCenter.Entities;
|
|
|
|
public class Notification : ITableObject<Guid>
|
|
{
|
|
public Guid Id { get; set; }
|
|
public Priority Priority { get; set; }
|
|
public bool Global { get; set; }
|
|
public ClientType ClientType { get; set; }
|
|
public Guid? UserId { get; set; }
|
|
public Guid? OrganizationId { get; set; }
|
|
[MaxLength(256)]
|
|
public string? Title { get; set; }
|
|
public string? Body { get; set; }
|
|
public DateTime CreationDate { get; set; }
|
|
public DateTime RevisionDate { get; set; }
|
|
public Guid? TaskId { get; set; }
|
|
|
|
public void SetNewId()
|
|
{
|
|
Id = CoreHelpers.GenerateComb();
|
|
}
|
|
}
|