package com.icomsys.main_vm.biz.rcp.conversation.dto;

import com.icomsys.main_vm.db.jpa.entity.conversation.TbIntentMaster;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;

/**
 * 인텐트 요청 DTO
 * 22.05.26
 *
 * @author downingmoon
 */

public class IntentRequestDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    private String  seq;
    private String custCode;
    private String serviceGroup;
    private String intentSeq;
    private String intentName;
    private String category;
    private String exampleText;
    private String registId;
    private String updateId;
    private String saveType;
    private String useYn;
    private String menuVal;
    private String oprMngCode;

    private List<IntentRequestDTO> intentList;
    private List<IntentRequestDTO> exampleList;

    public String getSeq() {
        return seq;
    }

    public void setSeq(String seq) {
        this.seq = seq;
    }

    public String getCustCode() {
        return custCode;
    }

    public void setCustCode(String custCode) {
        this.custCode = custCode;
    }

    public String getServiceGroup() {
        return serviceGroup;
    }

    public void setServiceGroup(String serviceGroup) {
        this.serviceGroup = serviceGroup;
    }

    public String getIntentSeq() {
        return intentSeq;
    }

    public void setIntentSeq(String intentSeq) {
        this.intentSeq = intentSeq;
    }

    public String getIntentName() {
        return intentName;
    }

    public void setIntentName(String intentName) {
        this.intentName = intentName;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getExampleText() {
        return exampleText;
    }

    public void setExampleText(String exampleText) {
        this.exampleText = exampleText;
    }

    public String getRegistId() {
        return registId;
    }

    public void setRegistId(String registId) {
        this.registId = registId;
    }

    public String getUpdateId() {
        return updateId;
    }

    public void setUpdateId(String updateId) {
        this.updateId = updateId;
    }

    public List<IntentRequestDTO> getIntentList() {
        return intentList;
    }

    public void setIntentList(List<IntentRequestDTO> intentList) {
        this.intentList = intentList;
    }

    public List<IntentRequestDTO> getExampleList() {
        return exampleList;
    }

    public void setExampleList(List<IntentRequestDTO> exampleList) {
        this.exampleList = exampleList;
    }

    public String getSaveType() {
        return saveType;
    }

    public void setSaveType(String saveType) {
        this.saveType = saveType;
    }

    public String getUseYn() {
        return useYn;
    }

    public void setUseYn(String useYn) {
        this.useYn = useYn;
    }

    public String getMenuVal() {
        return menuVal;
    }

    public void setMenuVal(String menuVal) {
        this.menuVal = menuVal;
    }
    /*    public TbIntentMaster toIntentMasterUpdate(String userId) {
        TbIntentMaster tim = new TbIntentMaster();
        tim.setSeq(Long.valueOf(this.seq));
        tim.setOprMngCode(this.oprMngCode);
        tim.setIntentName(this.intentName);
        tim.setCategory(this.category);
        tim.setUseYn(this.useYn);
        tim.setRegistId(userId);
        tim.setUpdateId(userId);
        return tim;
    }
    public TbIntentMaster toIntentMasterSave(String userId) {
        TbIntentMaster tim = new TbIntentMaster();
        tim.setOprMngCode(this.oprMngCode);
        tim.setIntentName(this.intentName);
        tim.setCategory(this.category);
        tim.setRegistId(userId);
        tim.setRegistDate(LocalDateTime.now());
        tim.setUpdateId(userId);
        tim.setUpdateDate(LocalDateTime.now());
        tim.setUseYn("Y");
        return tim;
    }*/

    public HashMap toMap() {
        HashMap m = new HashMap();
        m.put("seq", this.seq);
        m.put("serviceGroup", this.serviceGroup);
        m.put("custCode", this.custCode);
        m.put("intentSeq", this.intentSeq);
        m.put("intentName", this.intentName);
        m.put("category", this.category);
        m.put("registId", this.registId);
        m.put("updateId", this.updateId);
        m.put("intentList", this.intentList);
        m.put("exampleList", this.exampleList);
        m.put("saveType", this.saveType);
        m.put("menuVal", this.menuVal);
        m.put("oprMngCode", this.custCode + "_RCP_" + this.serviceGroup);
        return m;
    }

}
