using SqlSugar;
using System;

namespace YBDevice.Entity
{
    /// <summary>
    /// 审计日志
    /// </summary>
    [SugarTable("YB_AuditLogger", TableDescription = "审计日志", IsDisabledUpdateAll = false, IsDisabledDelete = true)]
    public class YB_AuditLogger
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public Guid Id { get; set; }
        /// <summary>
        /// 操作内容
        /// </summary>
        [SugarColumn(ColumnDescription = "操作内容", ColumnDataType = "nvarchar(100)")]
        public string Title { get; set; }
        /// <summary>
        /// 表名
        /// </summary>
        [SugarColumn(ColumnDescription = "表名", ColumnDataType = "nvarchar(100)")]
        public string TableName { get; set; }

        /// <summary>
        /// 列名
        /// </summary>
        [SugarColumn(ColumnDescription = "操作内容", ColumnDataType = "nvarchar(100)")]
        public string ColumnName { get; set; }
        /// <summary>
        /// 旧值
        /// </summary>
        [SugarColumn(ColumnDescription = "旧值", ColumnDataType = "nvarchar(max)")]
        public string OldValue { get; set; }
        /// <summary>
        /// 新值
        /// </summary>
        [SugarColumn(ColumnDescription = "新值", ColumnDataType = "nvarchar(max)")]
        public string NewValue { get; set; }
        /// <summary>
        /// 操作时间
        /// </summary>
        [SugarColumn(ColumnDescription = "操作时间")]
        public DateTime CreatTime { get; set; }

        /// <summary>
        /// 操作人Id
        /// </summary>
        [SugarColumn(ColumnDescription = "操作人Id")]
        public int BusinessId { get; set; }

        /// <summary>
        /// 操作人名称
        /// </summary>
        [SugarColumn(ColumnDescription = "操作人名称")]
        public string UserName { get; set; }

        /// <summary>
        /// 操作方式：新增、更新、删除
        /// </summary>
        [SugarColumn(ColumnDescription = "操作方式：新增、更新、删除")]
        public DiffType Operate { get; set; }
    }
}
