package com.application.zhangshi_app_android.ui.function;
|
|
import android.app.Application;
|
|
import androidx.annotation.NonNull;
|
import androidx.lifecycle.MutableLiveData;
|
|
import com.android.app_base.base.viewmodel.BaseViewModel;
|
import com.application.zhangshi_app_android.bean.LittleDoctorBean;
|
import com.application.zhangshi_app_android.data.DataRepository;
|
|
/**
|
* @author Ljj
|
* @date 2023.04.15. 17:56
|
* @desc 小医生详情 ViewModel
|
*/
|
public class LittleDoctorDetailActivityViewModel extends BaseViewModel<DataRepository> {
|
|
private MutableLiveData<LittleDoctorBean> beanLiveData;
|
|
public LittleDoctorDetailActivityViewModel(@NonNull Application application) {
|
super(application);
|
}
|
|
@Override
|
protected DataRepository initModel() {
|
return DataRepository.getInstance();
|
}
|
|
public MutableLiveData<LittleDoctorBean> getBeanLiveData() {
|
if (beanLiveData == null){
|
beanLiveData = new MutableLiveData<>();
|
}
|
return beanLiveData;
|
}
|
|
public void setBeanLiveData(LittleDoctorBean littleDoctorBean) {
|
beanLiveData.setValue(littleDoctorBean);
|
}
|
}
|