Entity.cs 444 B

123456789101112131415161718192021222324
  1. using FreeSql.DataAnnotations;
  2. using System.ComponentModel;
  3. namespace Admin.Core.Common.BaseModel
  4. {
  5. public interface IEntity
  6. {
  7. }
  8. public class Entity<TKey> : IEntity
  9. {
  10. /// <summary>
  11. /// 编号
  12. /// </summary>
  13. [Description("编号")]
  14. [Column(Position = 1, IsIdentity = true)]
  15. public virtual TKey Id { get; set; }
  16. }
  17. public class Entity : Entity<long>
  18. {
  19. }
  20. }