package com.ruoyi.system.domain;

import java.util.Date;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.xss.Xss;

/**
 * 模板管理对象 risk_template
 */
public class RiskTemplate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 模板ID */
    @Excel(name = "模板ID", cellType = ColumnType.NUMERIC)
    private Long templateId;

    /** 模板名称 */
    @Excel(name = "模板名称")
    private String templateName;

    /** 模板类型 */
    @Excel(name = "模板类型", readConverterExp = "1=尽调模板,2=评估模板,3=风控清单,4=标准函件")
    private String templateType;

    /** 版本号 */
    @Excel(name = "版本号")
    private String versionNo;

    /** 适用场景 */
    @Excel(name = "适用场景")
    private String applicableScene;

    /** 维护人 */
    @Excel(name = "维护人")
    private String maintainer;

    /** 模板状态 */
    @Excel(name = "模板状态", readConverterExp = "0=草稿,1=已发布,2=停用")
    private String templateStatus;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishTime;

    public Long getTemplateId()
    {
        return templateId;
    }

    public void setTemplateId(Long templateId)
    {
        this.templateId = templateId;
    }

    @Xss(message = "模板名称不能包含脚本字符")
    @NotBlank(message = "模板名称不能为空")
    @Size(min = 0, max = 100, message = "模板名称长度不能超过100个字符")
    public String getTemplateName()
    {
        return templateName;
    }

    public void setTemplateName(String templateName)
    {
        this.templateName = templateName;
    }

    public String getTemplateType()
    {
        return templateType;
    }

    public void setTemplateType(String templateType)
    {
        this.templateType = templateType;
    }

    @Xss(message = "版本号不能包含脚本字符")
    @Size(min = 0, max = 32, message = "版本号长度不能超过32个字符")
    public String getVersionNo()
    {
        return versionNo;
    }

    public void setVersionNo(String versionNo)
    {
        this.versionNo = versionNo;
    }

    @Xss(message = "适用场景不能包含脚本字符")
    @Size(min = 0, max = 100, message = "适用场景长度不能超过100个字符")
    public String getApplicableScene()
    {
        return applicableScene;
    }

    public void setApplicableScene(String applicableScene)
    {
        this.applicableScene = applicableScene;
    }

    @Xss(message = "维护人不能包含脚本字符")
    @Size(min = 0, max = 32, message = "维护人长度不能超过32个字符")
    public String getMaintainer()
    {
        return maintainer;
    }

    public void setMaintainer(String maintainer)
    {
        this.maintainer = maintainer;
    }

    public String getTemplateStatus()
    {
        return templateStatus;
    }

    public void setTemplateStatus(String templateStatus)
    {
        this.templateStatus = templateStatus;
    }

    public Date getPublishTime()
    {
        return publishTime;
    }

    public void setPublishTime(Date publishTime)
    {
        this.publishTime = publishTime;
    }

    @Override
    public String toString()
    {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("templateId", getTemplateId())
            .append("templateName", getTemplateName())
            .append("templateType", getTemplateType())
            .append("versionNo", getVersionNo())
            .append("applicableScene", getApplicableScene())
            .append("maintainer", getMaintainer())
            .append("templateStatus", getTemplateStatus())
            .append("publishTime", getPublishTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
