package com.xty.common.util

import com.xty.network.model.DeviceFunctionBean

object DeviceFunctionUtils {

    fun hasFunction(functionList:ArrayList<DeviceFunctionBean>,functionType:String) : Boolean{
        functionList.forEach {
            if(it.type == functionType && it.status == 1){
                return true
            }
        }
        return false
    }

    fun hasFunction(bean:DeviceFunctionBean,functionType:String):Boolean{
        if(bean.type == functionType && bean.status == 1){
            return true
        }
        return false
    }
}