package com.scm.contract.model.management;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import lombok.Data;

/**
 * @author zuo
 * @date 2024/6/13 12:50
 */
@Data
public class TagData {


    /**
     * id
     */
    @TableId
    private String tagTypeId;

    /**
     * 采购订单状态/申领标签状态
     */
    @TableId
    private String status;

    /**
     * 商品编码
     */
    @TableId
    private String dataType;

    /**
     * 物料编码
     */
    @TableField(value = "`number`")
    private Long number;

    @TableField(exist = false)
    private String tagTypeName;

    public String getDataTypeName() {
        String dataTypeName = null;
        String dataType = this.getDataType();
        if (StringUtils.isNotBlank(dataType)){
            switch (dataType){
                case "1":
                    dataTypeName = "标签采购";
                    break;
                case "2":
                    dataTypeName = "标签申领";
                    break;
                case "3":
                    dataTypeName = "标签作废";
                    break;
            }
        }
        return dataTypeName;
    }

}
