package com.tool.applockpro.data;

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

import com.tool.applockpro.ApplockSkin;

@Database(entities = {Mydata.class}, version = ApplockSkin.DB_Version, exportSchema = false)
public abstract class MyDataBase extends RoomDatabase {

    public abstract Mydao mydao();

    public static MyDataBase INSTANCE;

    public static MyDataBase getINSTANCE() {

        if (INSTANCE == null) {
            INSTANCE = Room.databaseBuilder(ApplockSkin.getContext(), MyDataBase.class, ApplockSkin.DB_Name).build();
        }

        return INSTANCE;
    }
}
