package org.xyzh.common.core.page;

import java.io.Serializable;
import java.util.List;

import lombok.Data;

@Data
public class PageDomain<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 分页参数
     * @author    yslg
     * @since 2025-11-02
     */
    private PageParam pageParam;
    
    /**
     * 数据列表
     * @author    yslg
     * @since 2025-11-02
     */
    private List<T> dataList;

    public PageDomain() {
    }
    
    public PageDomain(PageParam pageParam, List<T> dataList) {
        if (pageParam == null) {
            throw new IllegalArgumentException("分页参数不能为空");
        }
        
        this.pageParam = pageParam;
        this.dataList = dataList;
    }
}
