cloudroam
2025-04-01 2309f454c0e1df3c43fde66002a1d009c0b8f479
app/src/main/java/com/example/firstapp/database/repository/CodeRepository.kt
@@ -3,6 +3,7 @@
import androidx.annotation.WorkerThread
import com.example.firstapp.database.dao.CodeDao
import com.example.firstapp.database.entity.Code
import com.example.firstapp.model.StationGroup
import kotlinx.coroutines.flow.Flow
@@ -75,4 +76,14 @@
    fun getCurrentYearStats(date: Long) = codeDao.getCurrentYearStats(date)
    @WorkerThread
    fun getStationsByType(type: String): List<StationGroup> {
        return codeDao.getStationsByType(type)
    }
    @WorkerThread
    fun getPackagesByTypeAndStation(type: String, stationName: String): List<Code> {
        return codeDao.getPackagesByTypeAndStation(type, stationName)
    }
}