Camera Information System
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.
 
 
 
 

47 lines
903 B

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