package com.lc.myapplication.security.mysoundstwo.room;

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

import com.lc.myapplication.security.mysoundstwo.ScaryPrank;
import com.lc.myapplication.security.mysoundstwo.value.MyValue;

@Database(version = 1,entities = {ScaryPrankLikeEntity.class},exportSchema = false)
public abstract class ScaryPrankLikeDatabase extends RoomDatabase {
    private static ScaryPrankLikeDatabase scaryPrankLikeDatabase;
    public abstract ScaryPrankLikeDao getScaryPrankLikeDao();

    public static synchronized ScaryPrankLikeDatabase getScaryPrankLikeDatabase(){
        if (scaryPrankLikeDatabase == null){
            scaryPrankLikeDatabase = Room.databaseBuilder(MyValue.scaryPrank,ScaryPrankLikeDatabase.class, MyValue.DATA_BASE).build();
        }
        return scaryPrankLikeDatabase;
    }

}
