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_material
 */
public class RiskMaterial extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 资料ID */
    @Excel(name = "资料ID", cellType = ColumnType.NUMERIC)
    private Long materialId;

    /** 资料名称 */
    @Excel(name = "资料名称")
    private String materialName;

    /** 资料类型 */
    @Excel(name = "资料类型", readConverterExp = "1=基础资料,2=财务资料,3=法务资料,4=尽调附件")
    private String materialType;

    /** 所属项目 */
    @Excel(name = "所属项目")
    private String projectName;

    /** 资料来源 */
    @Excel(name = "资料来源")
    private String sourceChannel;

    /** 资料负责人 */
    @Excel(name = "资料负责人")
    private String ownerName;

    /** 资料状态 */
    @Excel(name = "资料状态", readConverterExp = "0=待收集,1=补充中,2=已归档")
    private String materialStatus;

    /** 文件路径 */
    @Excel(name = "文件路径")
    private String filePath;

    /** 提交日期 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "提交日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date submitDate;

    public Long getMaterialId()
    {
        return materialId;
    }

    public void setMaterialId(Long materialId)
    {
        this.materialId = materialId;
    }

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

    public void setMaterialName(String materialName)
    {
        this.materialName = materialName;
    }

    public String getMaterialType()
    {
        return materialType;
    }

    public void setMaterialType(String materialType)
    {
        this.materialType = materialType;
    }

    @Xss(message = "所属项目不能包含脚本字符")
    @Size(min = 0, max = 100, message = "所属项目长度不能超过100个字符")
    public String getProjectName()
    {
        return projectName;
    }

    public void setProjectName(String projectName)
    {
        this.projectName = projectName;
    }

    @Xss(message = "资料来源不能包含脚本字符")
    @Size(min = 0, max = 64, message = "资料来源长度不能超过64个字符")
    public String getSourceChannel()
    {
        return sourceChannel;
    }

    public void setSourceChannel(String sourceChannel)
    {
        this.sourceChannel = sourceChannel;
    }

    @Xss(message = "资料负责人不能包含脚本字符")
    @Size(min = 0, max = 32, message = "资料负责人长度不能超过32个字符")
    public String getOwnerName()
    {
        return ownerName;
    }

    public void setOwnerName(String ownerName)
    {
        this.ownerName = ownerName;
    }

    public String getMaterialStatus()
    {
        return materialStatus;
    }

    public void setMaterialStatus(String materialStatus)
    {
        this.materialStatus = materialStatus;
    }

    @Xss(message = "文件路径不能包含脚本字符")
    @Size(min = 0, max = 255, message = "文件路径长度不能超过255个字符")
    public String getFilePath()
    {
        return filePath;
    }

    public void setFilePath(String filePath)
    {
        this.filePath = filePath;
    }

    public Date getSubmitDate()
    {
        return submitDate;
    }

    public void setSubmitDate(Date submitDate)
    {
        this.submitDate = submitDate;
    }

    @Override
    public String toString()
    {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("materialId", getMaterialId())
            .append("materialName", getMaterialName())
            .append("materialType", getMaterialType())
            .append("projectName", getProjectName())
            .append("sourceChannel", getSourceChannel())
            .append("ownerName", getOwnerName())
            .append("materialStatus", getMaterialStatus())
            .append("filePath", getFilePath())
            .append("submitDate", getSubmitDate())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
