package com.bcxin.tenant.domain.readers.criterias;

import com.bcxin.Infrastructures.CriteriaAbstract;
import com.bcxin.Infrastructures.enums.TrueFalseStatus;
import lombok.Getter;

import java.util.Collection;
import java.util.Date;

@Getter
public class LeaveEmployeeCriteria extends CriteriaAbstract {
    private final String keyword;

    private Date startDate;
    private Date endDate;

    /**
     * 是否投保
     */
    private TrueFalseStatus insure;

    private Collection<String> departIds;

    private Collection<String> treeCodes;

    public LeaveEmployeeCriteria(int pageIndex, int pageSize, String keyword,Date startDate,Date endDate,
                                 TrueFalseStatus insure,
                                 Collection<String> departIds,
                                 Collection<String> treeCodes) {
        super(pageIndex, pageSize);
        this.keyword = keyword;
        this.startDate = startDate;
        this.endDate = endDate;
        this.insure = insure;
        this.departIds = departIds;
        this.treeCodes = treeCodes;
    }

    public static LeaveEmployeeCriteria create(int pageIndex, int pageSize, String keyword,Date startDate,Date endDate,
                                               TrueFalseStatus insure,
                                               Collection<String> departIds,
                                               Collection<String> treeCodes) {
        return new LeaveEmployeeCriteria(pageIndex, pageSize, keyword,startDate,endDate,insure,departIds,treeCodes);
    }
}
