using System;
namespace Core.Common
{
public class Pager
{
public string pagination { get; set; }
///
/// 每页行数
///
public int rows { get; set; }
///
/// 当前页是第几页
///
public int page { get; set; }
///
/// 排序方式
///
public string order { get; set; }
///
/// 排序字段
///
public string sort { get; set; }
///
/// 总行数
///
public int totalRows { get; set; }
///
/// 总页数
///
public int totalPages
{
get
{
if (totalRows == 0)
return 0;
else
return (int)Math.Ceiling((float)totalRows / (float)rows);
}
}
}
}