1
0
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:
SmithThe4th
2025-02-10 11:39:48 -05:00
committed by GitHub
parent e4d862fe6e
commit bde11dae31
16 changed files with 9330 additions and 6 deletions

View File

@@ -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));
}
}

View File

@@ -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