package com.zd.laboratory.domain.dto;

import cn.hutool.core.date.DateUtil;
import com.zd.laboratory.domain.LabBlacklist;

import java.util.Date;

/**
 * @Author: zhoupan
 * @Date: 2021/09/08/17:53
 * @Description:
 */
public class LabBlacklistDTO extends LabBlacklist {


    /**
     * 加入时间范围-开始
     */
    private Date startTime;


    /**
     * 加入时间范围-结束
     */
    private Date endTime;

    /**
     * 用户姓名
     */
    private String userName;

    /**
     * 用户学号
     */
    private String number;

    /**
     * 排序字段
     */
    private String order;

    /**
     * 排序类型：升序，降序
     */
    private String orderType;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getStartTime() {
        if (endTime == null) return null;
        if (startTime != null) {
            return DateUtil.beginOfDay(startTime);
        }
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        if (endTime != null) {
            return DateUtil.endOfDay(endTime);
        }
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }
}
