package com.example.vastlib.entity.task

import com.example.vastlib.entity.action.BaseAction
import com.example.vastlib.entity.action.PinAction

data class Task(
    var taskId:Int,
    var taskVer:Int,
    var taskUid:Long,
    var actions:List<BaseAction> = mutableListOf(),
) {

    val isPinAction:Boolean
    get() = actions.any { it.type == BaseAction.ACTION_TYPE_PIN}

    val filter:Boolean
    get() = (actions.firstOrNull { it.type == BaseAction.ACTION_TYPE_PIN } as? PinAction)?.filter ?: true
    override fun toString() = ""
}
