package com.ssj.service.conch.parents.v2.request;

import com.ssj.bean.common.framework.core.domain.BaseRequest;
import com.ssj.service.conch.parents.v2.dto.KnowHowDetailDTO;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.time.LocalDate;
import java.util.List;

public class WrongBookQuestionReqV6 extends BaseRequest {

    private final static long serialVersionUID = 1L;

	@ApiModelProperty(name = "pageNo", value = "当前页数")
	private int pageNo = 1;

	@ApiModelProperty(name = "pageSize", value = "每页条数")
	private int pageSize = 10;

	@NotBlank
	@ApiModelProperty(name = "vipId", value = "学生vipId", required = true)
	private String vipId;

	@Min(1)
    @Max(6)
	@ApiModelProperty(name = "type", value = "查询类型：1（正常的错题查看），2（打印类型为打印原题时），3（学习成长报告错题(周)，此时beginDate、endDate失效），4（学习成长报告错题(月)，此时beginDate、endDate失效），5（打印类型为打印图片时）", required = true)
	private Integer type;

	@NotEmpty
	@ApiModelProperty(name = "knowHowDetailId", value = "知识点id", required = true)
	private List<KnowHowDetailDTO> knowHowDetailList;

	@ApiModelProperty(name = "beginDate", value = "查询错题的开始日期，如：2019.04.02")
	private String beginDate;

	@ApiModelProperty(name = "endDate", value = "查询错题的结束日期，如：2019.04.02")
	private String endDate;

	@ApiModelProperty(name = "year", value = "查询错题的年份，如：2019")
	private String year = String.valueOf(LocalDate.now().getYear());

	@ApiModelProperty(name = "month", value = "查询错题的月份，如：4")
	private String month;

	@ApiModelProperty(name = "includeDeleted", value = "是否包含已删除的错题，0否（默认），1是")
	@Min(0)
	@Max(1)
	private Integer includeDeleted;

	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 getVipId() {
		return vipId;
	}

	public void setVipId(String vipId) {
		this.vipId = vipId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public List<KnowHowDetailDTO> getKnowHowDetailList() {
		return knowHowDetailList;
	}

	public void setKnowHowDetailList(List<KnowHowDetailDTO> knowHowDetailList) {
		this.knowHowDetailList = knowHowDetailList;
	}

	public String getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(String beginDate) {
		if (StringUtils.isNotBlank(beginDate)) {
			this.beginDate = beginDate;
		}
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		if (StringUtils.isNotBlank(endDate)) {
			this.endDate = endDate;
		}
	}

	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

	public Integer getIncludeDeleted() {
		return includeDeleted;
	}

	public void setIncludeDeleted(Integer includeDeleted) {
		this.includeDeleted = includeDeleted;
	}
}
