package com.example.ayudapy import android.content.Context import androidx.room.Database import androidx.room.Room import androidx.room.RoomDatabase @Database(entities = arrayOf(PedidoSave::class), version = 1) abstract class pedidoDataBase : RoomDatabase() { abstract fun daoPedido():DaoPedido companion object { private var INSTANCE: pedidoDataBase? = null fun getInstance(context: Context): pedidoDataBase { if (INSTANCE == null) { INSTANCE = Room.databaseBuilder( context, pedidoDataBase::class.java, "roomdb") .build() } return INSTANCE as pedidoDataBase } } }