package com.aucma.dms.domain;

import com.aucma.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;



/**
 * 工单文件;手工创建，从故障报修开始对象 dms_instance_file
 *
 * @author xins
 * @date 2024-03-13
 */
public class DmsInstanceFile extends DmsBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键标识 */
    private Long instanceFileId;

    /** 关联类型(1故障报修工单实例节点，2故障记录) */
    @Excel(name = "关联类型(1故障报修工单实例节点，2故障记录)")
    private String targetType;

    /** 关联类型为1时关联维修工单实例节点主键，关联类型为2时关联维修记录ID */
    @Excel(name = "关联类型为1时关联维修工单实例节点主键，关联类型为2时关联维修记录ID")
    private Long targetId;

    /** 故障文件地址，一般是图片 */
    @Excel(name = "故障文件地址，一般是图片")
    private String filePath;

    //file-list中需要有url才能正确预览图片
    private String url;

    private String name;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setInstanceFileId(Long instanceFileId)
    {
        this.instanceFileId = instanceFileId;
    }

    public Long getInstanceFileId()
    {
        return instanceFileId;
    }
    public void setTargetType(String targetType)
    {
        this.targetType = targetType;
    }

    public String getTargetType()
    {
        return targetType;
    }
    public void setTargetId(Long targetId)
    {
        this.targetId = targetId;
    }

    public Long getTargetId()
    {
        return targetId;
    }
    public void setFilePath(String filePath)
    {
        this.filePath = filePath;
    }

    public String getFilePath()
    {
        return filePath;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("instanceFileId", getInstanceFileId())
            .append("targetType", getTargetType())
            .append("targetId", getTargetId())
            .append("filePath", getFilePath())
            .toString();
    }
}
