using System.ComponentModel;

namespace VCommon.Logging.Viewer
{
    internal class LogEntity
    {
        [Description("文件名")]
        public string FileName { get; set; }

        [Description("时间")]
        public string WriteTime { get; set; }

        [Description("级别")]
        public string Level { get; set; }

        [Description("线程名")]
        public string ThreadName { get; set; }

        [Description("摘要")]
        public string Summary { get; set; }

        [Description("详情")]
        public string Detail { get; set; }

        [Description("行号")]
        public int LineNumber { get; set; }

        /// <summary>
        /// 或者把原始日志给ListViewItem的Tag
        /// </summary>
        /// <returns></returns>
        public override string ToString() => $@"{WriteTime} {Level} {ThreadName}
{Summary}
{Detail}";
    }
}