• 分页实体


       1: using Newtonsoft.Json;
       2: using Sunrise.General.Utils;
       3:  
       4: namespace Sunrise.General.Data {
       5:     /// <summary>
       6:     ///  分页处理类
       7:     /// </summary>
       8:     public class PageData<T> {
       9:         private int pageSize = 15;
      10:         private string status = MessageUtil.Success;
      11:         private string message = "加载成功!";
      12:  
      13:         /// <summary>
      14:         /// 总数
      15:         /// </summary>
      16:         [JsonProperty("total")]
      17:         public int TotalCount {
      18:             set;
      19:             get;
      20:         }
      21:  
      22:         /// <summary>
      23:         /// 页面显示的条数
      24:         /// </summary>
      25:         [JsonProperty("pageSize")]
      26:         public int PageSize {
      27:             get {
      28:                 return this.pageSize;
      29:             }
      30:             set {
      31:                 this.pageSize = value;
      32:             }
      33:         }
      34:  
      35:         /// <summary>
      36:         /// 页数
      37:         /// </summary>
      38:         [JsonProperty("pageCount")]
      39:         public int PageCount {
      40:             set;
      41:             get;
      42:         }
      43:  
      44:         /// <summary>
      45:         /// 当前页
      46:         /// </summary>
      47:         [JsonProperty("currentIndex")]
      48:         public int CurrentPageIndex {
      49:             set;
      50:             get;
      51:         }
      52:  
      53:         /// <summary>
      54:         /// 当前页数据
      55:         /// </summary>
      56:         [JsonProperty("data")]
      57:         public T Data {
      58:             set;
      59:             get;
      60:         }
      61:  
      62:         /// <summary>
      63:         /// 响应消息
      64:         /// </summary>
      65:         [JsonProperty("message")]
      66:         public string Message {
      67:             get {
      68:                 return this.message;
      69:             }
      70:             set {
      71:                 this.message = value;
      72:             }
      73:         }
      74:  
      75:         /// <summary>
      76:         /// 消息响应状态
      77:         /// </summary>
      78:         [JsonProperty("status")]
      79:         public string Status {
      80:             get {
      81:                 return this.status;
      82:             }
      83:             set {
      84:                 this.status = value;
      85:             }
      86:         }
      87:  
      88:         /// <summary>
      89:         /// 用户自定义
      90:         /// </summary>
      91:         public object UserObject {
      92:             get;
      93:             set;
      94:         }
      95:     }
      96: }
  • 相关阅读:
    Java Math 取整的方式
    Java final 关键词修饰类、方法、变量
    Android Activity 开发常用技巧整理
    Java override 和 overload 的区别
    Android TextView 常用技巧
    Android Adb 常用命令
    Android 实现应用升级方案(暨第三方自动升级服务无法使用后的解决方案)
    Git 常用命令
    Android 常见Crash Log汇总
    Java Annotation 总结
  • 原文地址:https://www.cnblogs.com/hornet/p/4246830.html
Copyright © 2020-2023  润新知