Audit Service
This commit is contained in:
49
FoodsharingSiegen.Contracts/Entity/Audit.cs
Normal file
49
FoodsharingSiegen.Contracts/Entity/Audit.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// The audit class (a. beging, 23.05.2022)
|
||||
/// </summary>
|
||||
public class Audit
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the created (ab)
|
||||
/// </summary>
|
||||
public DateTime? Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the data 1 (ab)
|
||||
/// </summary>
|
||||
public string? Data1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the data 2 (ab)
|
||||
/// </summary>
|
||||
public string? Data2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the id (ab)
|
||||
/// </summary>
|
||||
[Key] public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the type (ab)
|
||||
/// </summary>
|
||||
public AuditType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user (ab)
|
||||
/// </summary>
|
||||
public User? User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user id (ab)
|
||||
/// </summary>
|
||||
public Guid? UserID { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
23
FoodsharingSiegen.Contracts/Entity/AuditType.cs
Normal file
23
FoodsharingSiegen.Contracts/Entity/AuditType.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
public enum AuditType : int
|
||||
{
|
||||
None = 0,
|
||||
|
||||
// Profile
|
||||
SaveProfile = 10,
|
||||
SetOwnPassword = 20,
|
||||
|
||||
// Usermanagement
|
||||
CreateUser = 30,
|
||||
UpdateUser = 40,
|
||||
RemoveUser = 50,
|
||||
SetUserPassword = 60,
|
||||
|
||||
// Prospect
|
||||
CreateProspect = 70,
|
||||
EditProspect = 80,
|
||||
AddInteraction = 90,
|
||||
RemoveInteraction = 100
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user