using Newtonsoft.Json; using SqlSugar; namespace LY.App.Model { public class BaseEntity { /// /// ID /// 精度原因,返回前端时要转成字符串 /// [SugarColumn(IsNullable = false, IsPrimaryKey = true)] [JsonConverter(typeof(ValueToStringConverter))] public long Id { get; set; } /// /// 创建时间 /// [SugarColumn(IsNullable = true, ColumnDescription = "创建时间")] public virtual DateTime CreateTime { get; set; } = DateTime.Now; /// /// 是否删除 /// [SugarColumn(IsNullable = true, ColumnDescription = "是否删除", DefaultValue = "0")] [JsonIgnore] public bool IsDeleted { get; set; } } }