package com.flowing.light.board.db

import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.flowing.light.board.FlowingLightBoard
import com.flowing.light.board.bean.BeanDetails
import androidx.room.TypeConverters


@Database(
    entities = [BeanDetails::class],
    version = FlowingLightBoard.Companion.DB_VERSION,
    exportSchema = false
)
@TypeConverters(StringListConverter::class)
abstract class BaseDataBase : RoomDatabase() {

    abstract fun ThemesDao(): BeanDetailsDao



    companion object {
        val baseDataBase: BaseDataBase by lazy {
            Room.databaseBuilder(
                FlowingLightBoard.Companion.flowingLightBoardInstance,
                BaseDataBase::class.java,
                FlowingLightBoard.Companion.DB_NAME
            ).build()
        }
    }

}