package com.ecep.contract.service;

import com.ecep.contract.model.Employee;
import com.ecep.contract.model.EmployeeAuthBind;
import com.ecep.contract.util.ParamUtils;
import com.ecep.contract.vm.EmployeeAuthBindViewModel;
import com.ecep.contract.vo.EmployeeAuthBindVo;
import com.ecep.contract.vo.EmployeeVo;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class EmployeeAuthBindService extends QueryService<EmployeeAuthBindVo, EmployeeAuthBindViewModel> {

    public List<EmployeeAuthBindVo> findAllByEmployee(EmployeeVo employee) {
        return findAll(ParamUtils.builder().equals("employee", employee).build(), Pageable.unpaged()).getContent();
    }

}
