package com.fun.originalityprank.data;

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

import com.fun.originalityprank.PrankSkin;

@Database(entities = {AllData.class}, version = PrankSkin.DB_Version, exportSchema = false)
public abstract class MydataBase extends RoomDatabase {

    public abstract LikeDAO likeDAO();

    private static MydataBase INSTANCE;

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

        }
        return INSTANCE;

    }

}
