package com.syaroful.agrilinkvocpro.plant_disease_detection_feature.di

import androidx.room.Room
import com.syaroful.agrilinkvocpro.plant_disease_detection_feature.data.local.database.AppDatabase
import com.syaroful.agrilinkvocpro.plant_disease_detection_feature.data.repository.PlantDiagnosisLocalRepository
import org.koin.dsl.module

val databaseModule = module {
    single {
        Room.databaseBuilder(
            get(),
            AppDatabase::class.java,
            "plant_db"
        ).build()
    }

    single { get<AppDatabase>().plantDiagnosisDao() }

    single { PlantDiagnosisLocalRepository(get()) }
}