[CHANGE] Reworked db with interceptors
This commit is contained in:
22
Manager.Data/Entities/Audit/EntityHistory.cs
Normal file
22
Manager.Data/Entities/Audit/EntityHistory.cs
Normal 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; }
|
||||
}
|
Reference in New Issue
Block a user