平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BaseIdInput.cs 699 B

2 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. 
  2. //
  3. namespace SafeCampus.Core;
  4. /// <summary>
  5. /// 主键Id输入参数
  6. /// </summary>
  7. public class BaseIdInput
  8. {
  9. /// <summary>
  10. /// 主键Id
  11. /// </summary>
  12. [IdNotNull(ErrorMessage = "Id不能为空")]
  13. [DataValidation(ValidationTypes.Numeric)]
  14. public virtual long Id { get; set; }
  15. }
  16. public class BaseIdListInput
  17. {
  18. /// <summary>
  19. /// 主键Id列表
  20. /// </summary>
  21. [IdsNotNull(ErrorMessage = "IdList不能为空")]
  22. public List<long> Ids { get; set; } = new List<long>();
  23. }
  24. /// <summary>
  25. /// Id列表输入
  26. /// </summary>
  27. public class IdListInput
  28. {
  29. [Required(ErrorMessage = "IdList不能为空")]
  30. public List<long>? IdList { get; set; }
  31. }