package com.ssj.bean.common.framework.core.domain;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializeConfig;
import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Mount Liu
 * @date 2019/9/29
 */
public class BasePageRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(name = "pageNo", value = "页码", required = true)
    private int pageNo;
    @ApiModelProperty(name = "pageSize", value = "每页条数", required = true)
    private int pageSize;
    @ApiModelProperty(name = "maxCreateTime", value = "最大时间,格式(yyyy-MM-dd HH:mm:ss)", required = true)
    private String maxCreateTime;

    @Override
    public String toString() {
        SerializeConfig mapping = new SerializeConfig();
        mapping.put(Date.class, new SimpleDateFormatSerializer("yyyy-MM-dd HH:mm:ss"));
        return JSON.toJSONString(this);
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getMaxCreateTime() {
        return maxCreateTime;
    }

    public void setMaxCreateTime(String maxCreateTime) {
        this.maxCreateTime = maxCreateTime;
    }
}
