using System; using System.ComponentModel.DataAnnotations; namespace Infrastructure.Domain { public abstract class BaseEntity { public BaseEntity() { this.Id = Guid.NewGuid(); } [Display(Name = "Id")] public Guid Id { get; set; } [Display(Name = "序号")] public int DisplayOrder { get; set; } [Display(Name = "只读")] public bool IsReadOnly { get; set; } [Display(Name = "已删除")] public bool IsDeleted { get; set; } [Display(Name = "更新时间")] public DateTimeOffset UpdatedOn { get; set; } public override string ToString() { return $"{ GetType().FullName}[{Id}]"; } } }