| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | |
| | | 3 | | namespace OzonDomains.Models.Authorization; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Запись журнала аудита изменений прав (роли, разрешения, override). |
| | | 7 | | /// </summary> |
| | | 8 | | public class AuditLogEntry |
| | | 9 | | { |
| | 5 | 10 | | public long Id { get; set; } |
| | | 11 | | |
| | 3 | 12 | | public DateTime Timestamp { get; set; } = DateTime.UtcNow; |
| | | 13 | | |
| | | 14 | | [MaxLength(450)] |
| | 6 | 15 | | public string? ActorUserId { get; set; } |
| | | 16 | | |
| | | 17 | | [MaxLength(300)] |
| | 8 | 18 | | public string? ActorUserName { get; set; } |
| | | 19 | | |
| | | 20 | | [Required, MaxLength(100)] |
| | 9 | 21 | | public string Action { get; set; } = string.Empty; |
| | | 22 | | |
| | | 23 | | [Required, MaxLength(150)] |
| | 8 | 24 | | public string EntityType { get; set; } = string.Empty; |
| | | 25 | | |
| | | 26 | | [MaxLength(450)] |
| | 0 | 27 | | public string? EntityId { get; set; } |
| | | 28 | | |
| | 0 | 29 | | public string? OldValue { get; set; } |
| | 0 | 30 | | public string? NewValue { get; set; } |
| | | 31 | | |
| | | 32 | | [MaxLength(4000)] |
| | 0 | 33 | | public string? Comment { get; set; } |
| | | 34 | | |
| | | 35 | | [MaxLength(100)] |
| | 0 | 36 | | public string? IpAddress { get; set; } |
| | | 37 | | } |