package digital.laboratory.platform.imr.dto.base;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import digital.laboratory.platform.imr.component.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;

@Data
@ApiModel(value = "BaseQuery", description = "基础查询DTO类")
public class BaseQuery {

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = DateUtils.yyyy_MM_dd, timezone = DateUtils.TIME_ZONE)
    @JSONField(format = DateUtils.yyyy_MM_dd)
    private LocalDate beginDate;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = DateUtils.yyyy_MM_dd, timezone = DateUtils.TIME_ZONE)
    @JSONField(format = DateUtils.yyyy_MM_dd)
    private LocalDate finishDate;

    /**
     * 当前页
     */
    @ApiModelProperty(value = "当前页")
    private Integer current;

    /**
     * 每页显示条数
     */

    @ApiModelProperty(value = "每页显示条数")
    private Integer size;
}
