package com.ruoyi.ibs.task.domain.vo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.ibs.task.domain.entity.VisitFeedbackPrivate;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Arrays;
import java.util.List;

@Data
public class VisitFeedbackPrivateVo {

        /** uuid */
        @ApiModelProperty(value = "uuid",notes = "")
        @TableId
        private String id ;
        /** 客户反馈意见 */
        @ApiModelProperty(value = "客户反馈意见",notes = "")
        private String clientSuggestion ;
//    /** 客户标签 */
//    @ApiModelProperty(value = "客户标签",notes = "")
//    @TableField(typeHandler = StringListTypeHandler.class)
//    private List<String> clientLabel ;
        /** 意向产品 */
        @ApiModelProperty(value = "意向产品",notes = "")
        private List<String> intendProduct ;
        /** 其他意向 */
        @ApiModelProperty(value = "其他意向",notes = "")
        private String otherIntend ;

    public VisitFeedbackPrivateVo(VisitFeedbackPrivate visitFeedbackPrivate){
        this.id = visitFeedbackPrivate.getId();
        this.clientSuggestion = visitFeedbackPrivate.getClientSuggestion();
        if(StringUtils.isNotNull(visitFeedbackPrivate.getIntendProduct())){
            this.intendProduct = Arrays.asList(visitFeedbackPrivate.getIntendProduct().split(","));
        }
        this.otherIntend = visitFeedbackPrivate.getOtherIntend();
    }

}
