[CHANGE] Reworked db with interceptors

This commit is contained in:
max
2025-09-10 23:49:41 +02:00
parent b1e5b0dc68
commit 0f83cf1ddc
23 changed files with 293 additions and 79 deletions

View File

@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace Manager.Data.Entities.Audit;
public class EntityHistory
{
[MaxLength(200)]
public required string EntityName { get; set; }
[MaxLength(200)]
public required string EntityId { get; set; }
[MaxLength(200)]
public required string PropertyName { get; set; }
[MaxLength(1000)]
public string? OldValue { get; set; }
[MaxLength(1000)]
public string? NewValue { get; set; }
public DateTime ModifiedUtc { get; set; } = DateTime.UtcNow;
[MaxLength(200)]
public string? ChangedBy { get; set; }
public EntityState ChangeType { get; set; }
}