|
|
@ -28,26 +28,24 @@ import dagger.hilt.components.SingletonComponent
|
|
|
|
|
|
|
|
|
|
|
|
@Module
|
|
|
|
@Module
|
|
|
|
@InstallIn(SingletonComponent::class)
|
|
|
|
@InstallIn(SingletonComponent::class)
|
|
|
|
interface DaosModule {
|
|
|
|
object DaosModule {
|
|
|
|
companion object {
|
|
|
|
@Provides
|
|
|
|
@Provides
|
|
|
|
fun providesAuthorDao(
|
|
|
|
fun providesAuthorDao(
|
|
|
|
database: NiADatabase,
|
|
|
|
database: NiADatabase,
|
|
|
|
): AuthorDao = database.authorDao()
|
|
|
|
): AuthorDao = database.authorDao()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Provides
|
|
|
|
@Provides
|
|
|
|
fun providesTopicsDao(
|
|
|
|
fun providesTopicsDao(
|
|
|
|
database: NiADatabase,
|
|
|
|
database: NiADatabase,
|
|
|
|
): TopicDao = database.topicDao()
|
|
|
|
): TopicDao = database.topicDao()
|
|
|
|
|
|
|
|
|
|
|
|
@Provides
|
|
|
|
@Provides
|
|
|
|
fun providesEpisodeDao(
|
|
|
|
fun providesEpisodeDao(
|
|
|
|
database: NiADatabase,
|
|
|
|
database: NiADatabase,
|
|
|
|
): EpisodeDao = database.episodeDao()
|
|
|
|
): EpisodeDao = database.episodeDao()
|
|
|
|
|
|
|
|
|
|
|
|
@Provides
|
|
|
|
@Provides
|
|
|
|
fun providesNewsResourceDao(
|
|
|
|
fun providesNewsResourceDao(
|
|
|
|
database: NiADatabase,
|
|
|
|
database: NiADatabase,
|
|
|
|
): NewsResourceDao = database.newsResourceDao()
|
|
|
|
): NewsResourceDao = database.newsResourceDao()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|