package com.bcxin.tenant.open.domains.criterias;

import com.bcxin.tenant.open.infrastructures.criterias.CriteriaAbstract;
import com.bcxin.tenant.open.infrastructures.enums.ProjectStatus;
import lombok.Getter;

import java.util.Date;

@Getter
public class ProjectAdvanceSearchCriteria extends CriteriaAbstract {
    private final String name;
    private final String type;
    private final ProjectStatus status;
    private final Date beginDate;
    private final Date endDate;

    public ProjectAdvanceSearchCriteria(int pageIndex, int pageSize, String name, String type, ProjectStatus status, Date beginDate, Date endDate) {
        super(pageIndex,pageSize);
        this.name = name;
        this.type = type;
        this.status = status;
        this.beginDate = beginDate;
        this.endDate = endDate;
    }

    public static ProjectAdvanceSearchCriteria create(int pageIndex, int pageSize,String name, String type, ProjectStatus status, Date beginDate, Date endDate) {
        return new ProjectAdvanceSearchCriteria(pageIndex,pageSize, name, type, status, beginDate, endDate);
    }
}
