package com.jld.vod.viewmodel

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MutableLiveData
import androidx.room.Room
import com.jld.vod.model.bean.MovieByMidBean


/**
 * @author ZhaoFuXin
 * @Email：18276061387@163.com
 * @description:
 * @date :2020/1/10 13:40
 */
class MovieDetailsViewModel(app: Application)  : AndroidViewModel(app) {


   // val moviebymiddb = Room.databaseBuilder(app, MovieByMidDatabase::class.java, "moviebymid").build()

    val findMovieByMidliveData: MutableLiveData<List<MovieByMidBean>> = MutableLiveData()


    /**
     * 获取电影信息
     */
    fun findMovieByMid(movidId:Long) {
        Thread(Runnable {
         //   findMovieByMidliveData!!.postValue(moviebymiddb.movieByMidDao().loadAllByIds(movidId))
        }).start()
    }
}