package com.mvrent.carrental.repository;

import com.mvrent.carrental.model.Driver;
import com.mvrent.carrental.model.DriverStatus;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface DriverRepository extends JpaRepository<Driver, Long> {
    List<Driver> findAllByOrderByName();
    List<Driver> findByStatus(DriverStatus status);
    List<Driver> findByVendorIdOrderByName(Long vendorId);
    boolean existsByLicenceNumber(String licenceNumber);
}
