package com.key.vibekeyboard.Room;


import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;

import com.key.vibekeyboard.AppApplication;

@Database(entities = {WallpaperInfo.class}, version = AppApplication.DB_Version, exportSchema = false)
public abstract class MyDatabase extends RoomDatabase {

    public abstract WallpaperInfoDao wallpaperInfoDao();

    private static MyDatabase INSTANCE;

    public static MyDatabase getInstance() {
        if (INSTANCE == null) {
            synchronized (MyDatabase.class) {
                INSTANCE = Room.databaseBuilder(AppApplication.getContext(), MyDatabase.class, AppApplication.DB_Name).build();
            }
        }
        return INSTANCE;
    }


}
