mirror of
https://github.com/bitwarden/server
synced 2025-12-28 14:13:48 +00:00
Refactor to track entities rather than manually writing destroy
This commit is contained in:
9
src/Infrastructure.EntityFramework/Models/SeededData.cs
Normal file
9
src/Infrastructure.EntityFramework/Models/SeededData.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Bit.Infrastructure.EntityFramework.Models;
|
||||
|
||||
public class SeededData
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public required string RecipeName { get; set; }
|
||||
public required string Data { get; set; } // JSON blob with entity tracking info
|
||||
public DateTime CreationDate { get; set; }
|
||||
}
|
||||
@@ -87,6 +87,7 @@ public class DatabaseContext : DbContext
|
||||
public DbSet<OrganizationInstallation> OrganizationInstallations { get; set; }
|
||||
public DbSet<OrganizationReport> OrganizationReports { get; set; }
|
||||
public DbSet<OrganizationApplication> OrganizationApplications { get; set; }
|
||||
public DbSet<SeededData> SeededData { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user