Files
marechai/Marechai.Database/Models/Audit.cs

24 lines
775 B
C#
Raw Normal View History

2020-06-09 22:23:17 +01:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
2020-12-20 16:12:51 +00:00
using System.ComponentModel.DataAnnotations.Schema;
2020-06-09 22:23:17 +01:00
2025-11-13 04:05:35 +00:00
namespace Marechai.Database.Models;
public class Audit : BaseModel<long>
2020-06-09 22:23:17 +01:00
{
2025-11-13 04:05:35 +00:00
public AuditType Type { get; set; }
[Required]
public string UserId { get; set; }
public string Table { get; set; }
[Column(TypeName = "json")]
public Dictionary<string, object> Keys { get; set; }
[Column(TypeName = "json")]
public Dictionary<string, object> OldValues { get; set; }
[Column(TypeName = "json")]
public Dictionary<string, object> NewValues { get; set; }
[Column(TypeName = "json")]
public List<string> AffectedColumns { get; set; }
2020-06-09 22:23:17 +01:00
2025-11-13 04:05:35 +00:00
[Required]
public virtual ApplicationUser User { get; set; }
2020-06-09 22:23:17 +01:00
}