I have a class model ``` class AccountModelNode p...
# android
m
I have a class model
Copy code
class AccountModelNode private constructor(val key: String, val isLeaf: Boolean) {

    constructor(key: String, value: AccountCardViewModel) : this(key, true) {
        this.value = value
    }

    constructor(key: String, list: List<AccountModelNode>) : this(key, false) {
        this.list = list
    }

    var value: AccountCardViewModel? = null
        private set
    var list: List<AccountModelNode>? = null
        private set
}
and
AccoundCardViewModel
- data class, which has some fields:
Copy code
data class AccountCardViewModel(
    val isAutomatic: Boolean = false,
    val currencyCode: String = "",
    val description: String = "")
How do I use only the AccountCardViewModel fields instead of the AccoundCardViewModel class in the model?