BaseId.cs 529 B

12345678910111213141516171819202122232425
  1. using Furion.DataValidation;
  2. using System.ComponentModel.DataAnnotations;
  3. namespace YBEE.EQM.Core
  4. {
  5. /// <summary>
  6. /// 主键Id映射DTO
  7. /// </summary>
  8. public class BaseId : BaseId<int>
  9. {
  10. }
  11. /// <summary>
  12. /// 主键Id映射DTO
  13. /// </summary>
  14. public class BaseId<TKey>
  15. {
  16. /// <summary>
  17. /// 主键Id
  18. /// </summary>
  19. [Required(ErrorMessage = "Id不能为空")]
  20. [DataValidation(ValidationTypes.Numeric)]
  21. public TKey Id { get; set; }
  22. }
  23. }