package com.cm.common.util;

import java.util.HashMap;
import java.util.Map;

/**
 * 生成模板文件的参数对象
 */
public class TemplateCreateData<T> {

    /**
     *  模板编码
     */
    private String templateCode;

    /**
     * 模板数据对象 . 可调用 HashMapUtil.beanToMap(obj); 将对象快速转为Map
     */
    private Map<String, Object> templateDataMap = new HashMap<String, Object>();

    /**
     * 动态输出路径  例如 text/2020/06/17/ 。如果为空，则默认使用 年/月/日/进行存储
     */
    private String outFilePath;

    /**
     * 输出文件名称  例如 test.html , test.doc , test.excel 。 如果为空， 则默认使用 businessId.html
     */
    private String outFileName;

    /**
     * 业务表唯一ID
     */
    private String businessId;

    /**
     * 业务表的查询内容放入 , 方便后期查询
     */
    private String businessContent;

    public String getTemplateCode() {
        return templateCode == null ? "" : templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    public Map<String, Object> getTemplateDataMap() {
        return templateDataMap;
    }

    public void setTemplateDataMap(Map<String, Object> templateDataMap) {
        this.templateDataMap = templateDataMap;
    }

    public String getOutFilePath() {
        return outFilePath == null ? "" : outFilePath;
    }

    public void setOutFilePath(String outFilePath) {
        this.outFilePath = outFilePath;
    }

    public String getOutFileName() {
        return outFileName == null ? "" : outFileName;
    }

    public void setOutFileName(String outFileName) {
        this.outFileName = outFileName;
    }

    public String getBusinessContent() {
        return businessContent == null ? "" : businessContent;
    }

    public void setBusinessContent(String businessContent) {
        this.businessContent = businessContent;
    }

    public String getBusinessId() {
        return businessId == null ? "" : businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }
}
