mirror of
https://github.com/bitwarden/server
synced 2025-12-24 20:23:21 +00:00
[PM-14590] Modify Notification database table (#5361)
* 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
This commit is contained in:
@@ -30,6 +30,10 @@ public class NotificationEntityTypeConfiguration : IEntityTypeConfiguration<Noti
|
||||
.HasIndex(n => n.UserId)
|
||||
.IsClustered(false);
|
||||
|
||||
builder
|
||||
.HasIndex(n => n.TaskId)
|
||||
.IsClustered(false);
|
||||
|
||||
builder.ToTable(nameof(Notification));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using AutoMapper;
|
||||
using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Vault.Models;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.NotificationCenter.Models;
|
||||
|
||||
@@ -8,6 +9,7 @@ public class Notification : Core.NotificationCenter.Entities.Notification
|
||||
{
|
||||
public virtual User User { get; set; }
|
||||
public virtual Organization Organization { get; set; }
|
||||
public virtual SecurityTask Task { get; set; }
|
||||
}
|
||||
|
||||
public class NotificationMapperProfile : Profile
|
||||
|
||||
Reference in New Issue
Block a user