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

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

import java.util.Collection;

@Getter
public class ExternalMemberSearchCriteria extends CriteriaAbstract {
    private final String organizationId;
    private final String keyword;
    private final Collection<ApprovedStatus> statuses;
    private final Collection<String> groupIds;

    public ExternalMemberSearchCriteria(String organizationId, Collection<String> groupIds,Collection<ApprovedStatus> statuses,String keyword,int pageIndex, int pageSize) {
        super(pageIndex,pageSize);

        this.organizationId = organizationId;
        this.keyword = keyword;
        this.statuses = statuses;
        this.groupIds = groupIds;
    }

    public static ExternalMemberSearchCriteria create(String organizationId, Collection<String> groupIds,Collection<ApprovedStatus> statuses,String keyword,int pageIndex, int pageSize){
        return new ExternalMemberSearchCriteria(organizationId,groupIds,statuses, keyword,pageIndex,pageSize);
    }
}
