package com.abbidot.tracker.bean

import android.os.Parcelable
import com.abbidot.tracker.constant.MultipleEntity
import com.chad.library.adapter.base.entity.MultiItemEntity
import kotlinx.parcelize.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

/**
 *Created  by .yzq on 2021/12/20/020.
  * @link
 * @description:
 */
@Parcelize
data class DataBean(
    var id: String,
    var name: String,
    var value: String,
    var imageId: Int,
    var state: Int,
    var selectImageId: Int,
    var unit: String,
    var selected: Boolean = false,
    var checked: Boolean = false,
    var menuType: Int
) : MultiItemEntity, Parcelable {

    //设置空的构造方法
    constructor() : this("", "", "", 0, 0, 0, "", false, false, MultipleEntity.TEXT)

    constructor(name: String, value: String) : this(
        "", name, value, 0, 0,0, "", false, false, MultipleEntity.TEXT
    )

    //设置多个构造方法
    constructor(name: String, value: String, imageId: Int, unit: String) : this(
        "", name, value, imageId, 0, 0, unit, false, false, MultipleEntity.TEXT
    )

    @IgnoredOnParcel
    @MultipleEntity
    override val itemType = menuType
}
