package com.lc.myapplication.security.locks.lockroom;

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

import com.lc.myapplication.security.locks.value.MeValues;

@Database(entities = {SecurityLockEntity.class}, version = 1,exportSchema = false)
public abstract class SecurityLockDataBase extends RoomDatabase {
    private static SecurityLockDataBase securityLockDataBase;
    public abstract SecurityLockDAO getsecurityLockDAO();
    public static synchronized SecurityLockDataBase getSecurityLockDataBase(){
        if (securityLockDataBase == null){
            securityLockDataBase = Room.databaseBuilder(MeValues.lock,SecurityLockDataBase.class,MeValues.DB_NAME).build();

        }
        return securityLockDataBase;
    }

}
