source: WIP Database アノテーション付与

This commit is contained in:
r-ca 2023-12-14 02:59:32 +09:00
parent 26df200fe4
commit 8a789ffe7d
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -3,6 +3,8 @@ package one.nem.lacerta.source.database;
import androidx.room.Database; import androidx.room.Database;
// Entities // Entities
import dagger.hilt.InstallIn;
import dagger.hilt.components.SingletonComponent;
import one.nem.lacerta.source.database.entity.Tag; import one.nem.lacerta.source.database.entity.Tag;
import one.nem.lacerta.source.database.entity.Document; import one.nem.lacerta.source.database.entity.Document;
import one.nem.lacerta.source.database.entity.Library; import one.nem.lacerta.source.database.entity.Library;
@ -13,6 +15,7 @@ import one.nem.lacerta.source.database.dao.DocumentDao;
import one.nem.lacerta.source.database.dao.LibraryDao; import one.nem.lacerta.source.database.dao.LibraryDao;
@Database(entities = {Tag.class, Document.class, Library.class}, version = 1) @Database(entities = {Tag.class, Document.class, Library.class}, version = 1)
@InstallIn(SingletonComponent.class)
public abstract class LacertaDatabase { public abstract class LacertaDatabase {
public abstract TagDao tagDao(); public abstract TagDao tagDao();
public abstract DocumentDao documentDao(); public abstract DocumentDao documentDao();