package com.zcloud.zcGbsServicer.persistence.repository;

import com.jjb.saas.framework.repository.repo.BaseRepository;
import com.alibaba.cola.dto.PageResponse;
import com.zcloud.zcGbsServicer.persistence.dataobject.FireBrigadeScreenMemberRow;
import com.zcloud.zcGbsServicer.persistence.dataobject.FireBrigadeUserDO;

import java.util.Collection;
import java.util.List;
import java.util.Map;

public interface FireBrigadeUserRepository extends BaseRepository<FireBrigadeUserDO> {

    List<FireBrigadeUserDO> listAll();

    List<FireBrigadeUserDO> listByFireBrigadeIds(Collection<String> fireBrigadeIds);

    List<FireBrigadeUserDO> listByFireBrigadeIds(Collection<String> fireBrigadeIds, Long tenantId);

    Map<String, Integer> countByFireBrigadeIds(Collection<String> fireBrigadeIds);

    List<FireBrigadeUserDO> listByFireBrigadeId(String fireBrigadeId);

    List<FireBrigadeUserDO> listByUserId(Long userId);

    boolean existsRelation(String fireBrigadeId, Long userId, Long excludeId);

    PageResponse<FireBrigadeScreenMemberRow> listScreenMembers(Long corpinfoId, Integer portArea, int pageIndex, int pageSize);
}
