Base.cs 659 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. namespace ProductionLineMonitor.Core.Models
  4. {
  5. /// <summary>
  6. /// 基类
  7. /// </summary>
  8. public abstract class Base
  9. {
  10. public Base()
  11. {
  12. Id = Guid.NewGuid().ToString().ToUpper();
  13. }
  14. /// <summary>
  15. /// 主键
  16. /// </summary>
  17. [Key]
  18. public string Id { get; set; }
  19. /// <summary>
  20. /// 创建时间
  21. /// </summary>
  22. public DateTime? CreateTime { get; set; }
  23. /// <summary>
  24. /// 修改时间
  25. /// </summary>
  26. public DateTime? UpdateTime { get; set; }
  27. }
  28. }