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

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

import java.util.Collection;

@Getter
public class OrganizationCriteria extends CriteriaAbstract {
    private final String superviseRegionCode;
    private final Collection<ApprovedStatus> statuses;
    private final String name;
    private final String industryCode;
    private final String startDate;
    private final String endDate;

    public OrganizationCriteria(String superviseRegionCode, String name, String industryCode, Collection<ApprovedStatus> statuses,String startDate,String endDate, int pageIndex, int pageSize) {
        super(pageIndex, pageSize);
        this.superviseRegionCode = superviseRegionCode;
        this.statuses = statuses;
        this.name = name;
        this.industryCode = industryCode;
        this.startDate = startDate;
        this.endDate = endDate;
    }

    public static OrganizationCriteria create(String superviseRegionCode, String name, String industryCode, Collection<ApprovedStatus> statuses,String startDate,String endDate,int pageIndex, int pageSize) {
        return new OrganizationCriteria(superviseRegionCode, name, industryCode, statuses, startDate,endDate,pageIndex, pageSize);
    }
}
