using SqlSugar; using System; using System.Collections.Generic; using System.Text; namespace HKLib.DB.Model { public class BaseEntity { [SugarColumn(IsPrimaryKey = true)] public Guid Id { get; set; } [SugarColumn(ColumnDataType = "DATETIME")] public DateTime CreateTime { get; set; } public void Create() { this.Id = Guid.NewGuid(); this.CreateTime = DateTime.Now; } } }