namespace Cis.Core;
public class Pagination
{
///
/// 当前页
///
public virtual int Index { get; set; }
///
/// 页码容量
///
public virtual int Size { get; set; }
///
/// 排序字段
///
public virtual string Field { get; set; }
///
/// 排序方向
///
public virtual string Order { get; set; }
///
/// 总记录数
///
public virtual int Total { get; set; }
///
/// 页码数
///
public virtual int Number
{
get
{
if (Size > 0)
{
return ((Size % Total) == 0) ? (Size / Total) : ((Size / Total) + 1);
}
else
{
return 0;
}
}
}
}