package com.ruoyi.mxjb.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.time.DateUtils;

import java.util.Date;

@ApiModel("学习记录查询条件")
public class MxjbStudyStatCond {
    @ApiModelProperty("学校id")
    Long schoolId;
    @ApiModelProperty("年级id")
    Integer gradeId;
    @ApiModelProperty("卡号")
    String cardNo;
    @ApiModelProperty("开始时间")
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    Date begin;
    @ApiModelProperty("结束时间")
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    Date end;

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public Integer getGradeId() {
        return gradeId;
    }

    public void setGradeId(Integer gradeId) {
        this.gradeId = gradeId;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public Date getBegin() {
        return begin;
    }

    public void setBegin(Date begin) {
        this.begin = begin;
    }

    public Date getEnd() {
        return null != end ? DateUtils.addSeconds(DateUtils.addDays(end, 1), -1) : null;
    }

    public void setEnd(Date end) {
        this.end = end;
    }
}
