package com.lukouguoji.gnj.model

import com.alibaba.fastjson.JSONArray

class GnjCangDanInfoItemModel(
    val isMust: Boolean,//是否必选
    val isEnable: Boolean,//是否允许操作
    val titleName: String,//输入框名字
    val titleCode: String,
    val isSel: Boolean,//是否下拉框

    var inputContent: String,//输入框内容

    val selList: JSONArray?,//下拉框数据集合
    var selContentCode: String,//下拉框code

    val titleCodePre: String?,
    var inputContentPre: String?,//输入框内容前缀
) {

    /**
     * 输入框构造
     */
    constructor(isMust: Boolean, isEnable: Boolean, titleName: String, titleCode: String, inputContent: String) : this(
        isMust,
        isEnable,
        titleName,
        titleCode,
        false,
        inputContent,
        null,
        "",
        null,
        null
    )

    /**
     * 2个输入框构造  运单
     */
    constructor(
        isMust: Boolean,
        isEnable: Boolean,
        titleName: String,
        titleCode: String,
        inputContent: String,
        titleCodePre: String,
        inputContentPre: String
    ) : this(
        isMust,
        isEnable,
        titleName,
        titleCode,
        false,
        inputContent,
        null,
        "",
        titleCodePre,
        inputContentPre
    )


    /**
     * 下拉框构造
     */
    constructor(
        isMust: Boolean, isEnable: Boolean, titleName: String, titleCode: String,
        selList: JSONArray,
        selContentCode: String
    ) : this(
        isMust,
        isEnable,
        titleName,
        titleCode,
        true,
        "",
        selList,
        selContentCode,
        null,
        null
    )

}