using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace MasstransferInfrastructure.Database.DTO;
///
/// 分页结果
///
public class Page : INotifyPropertyChanged
{
private int _total;
private int _pages;
private int _currentPage;
private List _data = [];
private int _pageSize;
public int CurrentPage
{
get => _currentPage;
set
{
_currentPage = value;
OnPropertyChanged();
}
}
public int PageSize
{
get => _pageSize;
set
{
_pageSize = value;
OnPropertyChanged();
}
}
public int Total
{
get => _total;
set
{
_total = value;
OnPropertyChanged();
}
}
public int Pages
{
get => _pages;
set
{
_pages = value;
OnPropertyChanged();
}
}
public List Data
{
get => _data;
set
{
_data = value;
OnPropertyChanged();
}
}
public event PropertyChangedEventHandler? PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}