package com.yunfeiyun.agmp.fms.domain;

import com.yunfeiyun.agmp.common.annotation.Excel;
import com.yunfeiyun.agmp.common.core.domain.BaseEntity;
import com.yunfeiyun.agmp.common.utils.img.entity.GraphicsCanvasItem;
import com.yunfeiyun.agmp.common.utils.img.enums.BusType;
import com.yunfeiyun.agmp.common.utils.img.enums.MediaType;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 溯源码模板参数对象 TssTracecodetplparam
 * 
 * @author 杨晓辉
 * @date 2023-07-06
 */
public class TssTracecodetplparam extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 溯源码模板参数标识 */
    private String tplparamId;

    /** 溯源码模板标识 */
    @Excel(name = "溯源码模板标识")
    private String tracecodetplId;

    /** 溯源码模板参数排序 */
    @Excel(name = "溯源码模板参数排序")
    private Integer tplparamSeq;

    /** 溯源码模板参数备注 */
    @Excel(name = "溯源码模板参数备注")
    private String tplparamRemark;

    /** 溯源码模板参数媒体类型 */
    @Excel(name = "溯源码模板参数媒体类型")
    private String tplparamMediatype;

    /** 溯源码模板参数业务类型 */
    @Excel(name = "溯源码模板参数业务类型")
    private String tplparamBustype;

    /** 溯源码模板参数宽度 */
    @Excel(name = "溯源码模板参数宽度")
    private Integer tplparamWidth;

    /** 溯源码模板参数高度 */
    @Excel(name = "溯源码模板参数高度")
    private Integer tplparamHeight;

    /** 溯源码模板参数X轴坐标 */
    @Excel(name = "溯源码模板参数X轴坐标")
    private Integer tplparamPosx;

    /** 溯源码模板参数Y轴坐标 */
    @Excel(name = "溯源码模板参数Y轴坐标")
    private Integer tplparamPosy;

    /** 溯源码模板参数背景颜色 */
    @Excel(name = "溯源码模板参数背景颜色")
    private String tplparamBgcolor;

    /** 溯源码模板参数字体系列 */
    @Excel(name = "溯源码模板参数字体系列")
    private String tplparamFontfamily;

    /** 溯源码模板参数字体形状 */
    @Excel(name = "溯源码模板参数字体形状")
    private Integer tplparamFontstyle;

    /** 溯源码模板参数字体大小 */
    @Excel(name = "溯源码模板参数字体大小")
    private Integer tplparamFontsize;

    /** 溯源码模板参数线宽 */
    @Excel(name = "溯源码模板参数线宽")
    private Integer tplparamLinewidth;

    /** 溯源码模板参数边距 */
    @Excel(name = "溯源码模板参数边距")
    private Integer tplparamMargin;

    /** 溯源码模板参数数据 */
    @Excel(name = "溯源码模板参数数据")
    private String tplparamData;

    public void setTplparamId(String tplparamId)
    {
        this.tplparamId = tplparamId;
    }

    public String getTplparamId()
    {
        return tplparamId;
    }
    public void setTracecodetplId(String tracecodetplId)
    {
        this.tracecodetplId = tracecodetplId;
    }

    public String getTracecodetplId()
    {
        return tracecodetplId;
    }
    public void setTplparamSeq(Integer tplparamSeq)
    {
        this.tplparamSeq = tplparamSeq;
    }

    public Integer getTplparamSeq()
    {
        return tplparamSeq;
    }
    public void setTplparamRemark(String tplparamRemark)
    {
        this.tplparamRemark = tplparamRemark;
    }

    public String getTplparamRemark()
    {
        return tplparamRemark;
    }
    public void setTplparamMediatype(String tplparamMediatype)
    {
        this.tplparamMediatype = tplparamMediatype;
    }

    public String getTplparamMediatype()
    {
        return tplparamMediatype;
    }
    public void setTplparamBustype(String tplparamBustype)
    {
        this.tplparamBustype = tplparamBustype;
    }

    public String getTplparamBustype()
    {
        return tplparamBustype;
    }
    public void setTplparamWidth(Integer tplparamWidth)
    {
        this.tplparamWidth = tplparamWidth;
    }

    public Integer getTplparamWidth()
    {
        return tplparamWidth;
    }
    public void setTplparamHeight(Integer tplparamHeight)
    {
        this.tplparamHeight = tplparamHeight;
    }

    public Integer getTplparamHeight()
    {
        return tplparamHeight;
    }
    public void setTplparamPosx(Integer tplparamPosx)
    {
        this.tplparamPosx = tplparamPosx;
    }

    public Integer getTplparamPosx()
    {
        return tplparamPosx;
    }
    public void setTplparamPosy(Integer tplparamPosy)
    {
        this.tplparamPosy = tplparamPosy;
    }

    public Integer getTplparamPosy()
    {
        return tplparamPosy;
    }
    public void setTplparamBgcolor(String tplparamBgcolor)
    {
        this.tplparamBgcolor = tplparamBgcolor;
    }

    public String getTplparamBgcolor()
    {
        return tplparamBgcolor;
    }
    public void setTplparamFontfamily(String tplparamFontfamily)
    {
        this.tplparamFontfamily = tplparamFontfamily;
    }

    public String getTplparamFontfamily()
    {
        return tplparamFontfamily;
    }
    public void setTplparamFontstyle(Integer tplparamFontstyle)
    {
        this.tplparamFontstyle = tplparamFontstyle;
    }

    public Integer getTplparamFontstyle()
    {
        return tplparamFontstyle;
    }
    public void setTplparamFontsize(Integer tplparamFontsize)
    {
        this.tplparamFontsize = tplparamFontsize;
    }

    public Integer getTplparamFontsize()
    {
        return tplparamFontsize;
    }
    public void setTplparamLinewidth(Integer tplparamLinewidth)
    {
        this.tplparamLinewidth = tplparamLinewidth;
    }

    public Integer getTplparamLinewidth()
    {
        return tplparamLinewidth;
    }
    public void setTplparamMargin(Integer tplparamMargin)
    {
        this.tplparamMargin = tplparamMargin;
    }

    public Integer getTplparamMargin()
    {
        return tplparamMargin;
    }
    public void setTplparamData(String tplparamData)
    {
        this.tplparamData = tplparamData;
    }

    public String getTplparamData()
    {
        return tplparamData;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("tplparamId", getTplparamId())
            .append("tracecodetplId", getTracecodetplId())
            .append("tplparamSeq", getTplparamSeq())
            .append("tplparamRemark", getTplparamRemark())
            .append("tplparamMediatype", getTplparamMediatype())
            .append("tplparamBustype", getTplparamBustype())
            .append("tplparamWidth", getTplparamWidth())
            .append("tplparamHeight", getTplparamHeight())
            .append("tplparamPosx", getTplparamPosx())
            .append("tplparamPosy", getTplparamPosy())
            .append("tplparamBgcolor", getTplparamBgcolor())
            .append("tplparamFontfamily", getTplparamFontfamily())
            .append("tplparamFontstyle", getTplparamFontstyle())
            .append("tplparamFontsize", getTplparamFontsize())
            .append("tplparamLinewidth", getTplparamLinewidth())
            .append("tplparamMargin", getTplparamMargin())
            .append("tplparamData", getTplparamData())
            .toString();
    }

    public GraphicsCanvasItem transToGraphicsCanvasItem(){
        GraphicsCanvasItem graphicsCanvasItem = new GraphicsCanvasItem();
        graphicsCanvasItem.setRemark(this.tplparamRemark);
        graphicsCanvasItem.setMediaType(MediaType.valueOf(this.tplparamMediatype));
        graphicsCanvasItem.setBusType(BusType.valueOf(this.tplparamBustype));
        graphicsCanvasItem.setWidth(this.tplparamWidth);
        graphicsCanvasItem.setHeight(this.tplparamHeight);
        graphicsCanvasItem.setPositionX(this.tplparamPosx);
        graphicsCanvasItem.setPositionY(this.tplparamPosy);
        graphicsCanvasItem.setBackgroundColor(this.tplparamBgcolor);
        graphicsCanvasItem.setFontType(this.tplparamFontfamily);
        graphicsCanvasItem.setFontStyle(this.tplparamFontstyle);
        graphicsCanvasItem.setFontSize(this.tplparamFontsize);
        graphicsCanvasItem.setLineWidth(this.tplparamLinewidth);
        graphicsCanvasItem.setMargin(this.tplparamMargin);
        graphicsCanvasItem.setData(this.tplparamData);
        return graphicsCanvasItem;
    }
}
