refactor: 抽象操作日志模块
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Domain.Shared.Logs
|
||||
{
|
||||
public enum OperEnum
|
||||
{
|
||||
Insert = 1,
|
||||
Update = 2,
|
||||
Delete = 3,
|
||||
Auth = 4,
|
||||
Export = 5,
|
||||
Import = 6,
|
||||
ForcedOut = 7,
|
||||
GenerateCode = 8,
|
||||
ClearData = 9
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Domain.Shared.Logs
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public class OperLogAttribute : System.Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 操作类型
|
||||
/// </summary>
|
||||
public OperEnum OperType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 日志标题(模块)
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否保存请求数据
|
||||
/// </summary>
|
||||
public bool IsSaveRequestData { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否保存返回数据
|
||||
/// </summary>
|
||||
public bool IsSaveResponseData { get; set; } = true;
|
||||
|
||||
public OperLogAttribute(string title, OperEnum operationType)
|
||||
{
|
||||
this.Title = title;
|
||||
this.OperType = operationType;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user