20 lines
500 B
20 lines
500 B
3 years ago
|
using System;
|
||
|
using PetaPoco;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
|
namespace Pingchuan.BeijingSafeguard.Model
|
||
|
{
|
||
|
public class Pagination<T>
|
||
|
{
|
||
|
public long total { get; set; }
|
||
|
public List<T> rows { get; set; }
|
||
|
|
||
|
public static Pagination<T> FromPage(Page<T> page)
|
||
|
{
|
||
|
Pagination<T> pagination = new Pagination<T>();
|
||
|
pagination.total = page.TotalItems;
|
||
|
pagination.rows = page.Items;
|
||
|
return pagination;
|
||
|
}
|
||
|
}
|
||
|
}
|