@Sandip Soni
, (, ) Firebase, , , . , Firestore
, Firestore
db . , :
class Firestore {
companion object {
val instance: FirebaseFirestore by lazy {
return@lazy synchronized(Firestore::class){
FirebaseFirestore.getInstance().apply { lock() }
}
}
private fun FirebaseFirestore.lock() {
collection("config").document("db").update("locked", true)
}
}
}