using Enums;
namespace Attribute
{
///
/// 自定义操作日志记录注解
///
public class LogAttribute : System.Attribute
{
public string Title { get; set; }
public BusinessType BusinessType { get; set; }
///
/// 是否保存请求数据
///
public bool IsSaveRequestData { get; set; } = true;
///
/// 是否保存返回数据
///
public bool IsSaveResponseData { get; set; } = true;
public LogAttribute() { }
public LogAttribute(string name)
{
Title = name;
}
public LogAttribute(string name, BusinessType businessType, bool saveRequestData = true, bool saveResponseData = true)
{
Title = name;
BusinessType = businessType;
IsSaveRequestData = saveRequestData;
IsSaveResponseData = saveResponseData;
}
}
}