using System;
using System.Runtime.Serialization;
using MiniExcelLibs.Attributes;
using SqlSugar;

namespace SlnMesnac.Model.domain
{
    /// <summary>
    /// 异常监控编码对应表
    /// </summary>
    [SugarTable("BaseCode"), TenantAttribute("mes")]
    [DataContract(Name = "BaseCode 基础表")]
    public class BaseCode
    {
        /// <summary>
        ///  
        ///</summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        ///  
        ///</summary>
        [SugarColumn(ColumnName = "code")]
        public string Code { get; set; }
        /// <summary>
        ///  
        ///</summary>
        [SugarColumn(ColumnName = "state")]
        public string  State { get; set; }
        
        
        /// <summary>
        ///  1 RFid 2 视觉
        ///</summary>
        [SugarColumn(ColumnName = "category")]
        public int  Category { get; set; }
        
    }


    [SugarTable("BaseLog"), TenantAttribute("mes")]
    [DataContract(Name = "BaseLog 基础表")]

    public class BaseLog
    {

      public   BaseLog()
        {
            this.CreateTime = DateTime.Now;
        }


        [ExcelColumnName("标识"), ExcelColumnWidth(15)]
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        [ExcelColumnName("记录时间"), ExcelColumnWidth(15)]
        [SugarColumn(ColumnName = "createtime")]
        public DateTime CreateTime { get; set; }

        [ExcelColumnName("日志类型"), ExcelColumnWidth(15)]
        [SugarColumn(ColumnName = "log_type")]
        public string LogType { get; set; }

        [ExcelColumnName("日志级别"), ExcelColumnWidth(15)]
        [SugarColumn(ColumnName = "log_level")]
        public string LogLevel { get; set; }

        [ExcelColumnName("日志内容"), ExcelColumnWidth(60)]
        [SugarColumn(ColumnName = "content")]
        public string Content { get; set; }

        [ExcelColumnName("异常信息"), ExcelColumnWidth(50)]
        [SugarColumn(ColumnName = "err_msg")]
        public string ErrMsg { get; set; }

    }
}