BITKit/Packages/Runtime~/Core/Models/LogModel.cs

32 lines
763 B
C#
Raw Normal View History

2023-06-07 18:38:07 +08:00
#if UNITY
#else
using System.ComponentModel.DataAnnotations;
#endif
using System;
namespace BITKit
{
public interface ILog
{
int Id { get; }
string EntityName { get; }
public string Message { get; }
public string StackTrace { get; }
DateTime CreateTime { get; }
string CreateUser { get; }
}
[System.Serializable]
public record LogModel:ILog
{
#if UNITY
#else
[Key]
#endif
public int Id { get; set; }
public string EntityName { get; set; }
public string Message { get; set; }
public string StackTrace { get; set; }
public DateTime CreateTime { get; set; }=DateTime.Now;
public string CreateUser { get; set; } = nameof(BITKit);
};
}