package com.crm.manager.dao.repository;

import com.crm.rely.backend.core.pojo.table.CustomLoginDeleteExcludeTable;
import com.crm.rely.backend.dao.repository.BaseRepository;
import org.springframework.data.jpa.repository.Lock;

import javax.persistence.LockModeType;
import java.util.List;

public interface CustomLoginDeleteExcludeRepository  extends BaseRepository< CustomLoginDeleteExcludeTable> {

    @Lock(LockModeType.PESSIMISTIC_WRITE)
    CustomLoginDeleteExcludeTable findFirstById(Long id);

    List<CustomLoginDeleteExcludeTable> findAllByIdIn(List<Long> ids);

    CustomLoginDeleteExcludeTable getFirstById(Long id);

    CustomLoginDeleteExcludeTable findByLogin(Long login);
    CustomLoginDeleteExcludeTable getFirstByLoginAndPlatform(Long login,String platform);

    CustomLoginDeleteExcludeTable findByCId(Long cId);
}
