Result.cs 707 B

123456789101112131415161718192021222324252627282930313233
  1. namespace ERP.Framework.WebApi
  2. {
  3. public class Result
  4. {
  5. /// <summary>
  6. /// 状态码
  7. /// </summary>
  8. public int Code { get; set; } = 200;
  9. /// <summary>
  10. /// 返回消息
  11. /// </summary>
  12. public string Message { get; set; } = string.Empty;
  13. }
  14. public class Result<T>
  15. {
  16. /// <summary>
  17. /// 状态码
  18. /// </summary>
  19. public int Code { get; set; } = 200;
  20. /// <summary>
  21. /// 返回消息
  22. /// </summary>
  23. public string Message { get; set; } = string.Empty;
  24. /// <summary>
  25. /// 返回数据
  26. /// </summary>
  27. public T? Data { get; set; }
  28. }
  29. }