2018-06-16 22:11:25 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2018-09-16 16:34:16 -04:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2018-06-16 22:11:25 -04:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Database.Models
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This class models the change to different entities
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class EFChangeHistory : SharedEntity
|
|
|
|
|
{
|
|
|
|
|
public enum ChangeType
|
|
|
|
|
{
|
2018-09-12 20:53:11 -04:00
|
|
|
|
Permission,
|
2018-09-23 20:45:54 -04:00
|
|
|
|
Ban,
|
|
|
|
|
Command
|
2018-06-16 22:11:25 -04:00
|
|
|
|
}
|
2018-09-16 16:34:16 -04:00
|
|
|
|
|
2018-06-16 22:11:25 -04:00
|
|
|
|
[Key]
|
|
|
|
|
public int ChangeHistoryId { get; set; }
|
|
|
|
|
public int OriginEntityId { get; set; }
|
|
|
|
|
public int TargetEntityId { get; set; }
|
|
|
|
|
public ChangeType TypeOfChange { get; set; }
|
|
|
|
|
public DateTime TimeChanged { get; set; } = DateTime.UtcNow;
|
|
|
|
|
[MaxLength(128)]
|
|
|
|
|
public string Comment { get; set; }
|
2018-09-12 20:53:11 -04:00
|
|
|
|
public string PreviousValue { get; set; }
|
|
|
|
|
public string CurrentValue { get; set; }
|
2018-06-16 22:11:25 -04:00
|
|
|
|
}
|
|
|
|
|
}
|