package space.nstart.pcp.pcp_satellite_catalog_service.repository

import org.springframework.data.jpa.repository.JpaRepository
import space.nstart.pcp.pcp_satellite_catalog_service.entity.SatelliteEntity

interface SatelliteRepository : JpaRepository<SatelliteEntity, Long> {
    fun findAllByOrderByIdAsc(): List<SatelliteEntity>
    fun findByNoradId(noradId: Long): SatelliteEntity?
    fun findAllByIdIn(ids: Collection<Long>): List<SatelliteEntity>
    fun existsByNoradId(noradId: Long): Boolean
    fun existsByNoradIdAndIdNot(noradId: Long, id: Long): Boolean
    fun existsByCode(code: String): Boolean
    fun existsByCodeAndIdNot(code: String, id: Long): Boolean
}
