平安校园
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 686 B

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