package llc.arma.fleet.monitor.data.repository

import llc.arma.fleet.monitor.data.entity.MachineEntity
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
import org.springframework.data.jpa.repository.JpaRepository

interface MachineRepository : JpaRepository<MachineEntity, Long> {
    fun existsByLicensePlate(licensePlate: String): Boolean
    fun findByNameContainingIgnoreCaseOrLicensePlateContainingIgnoreCase(
        name: String,
        licensePlate: String,
        pageable: Pageable,
    ): Page<MachineEntity>
}
