package cn.estsh.i3plus.pojo.platform.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description : 文件附件
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2019-04-11 16:01
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_FILE_ATTACH")
@Api(value="文件附件",description = "文件附件")
public class SysFileAttach extends BaseBean {

    private static final long serialVersionUID = -6730529794381568890L;
    @Column(name="ATTACH_SOFT_TYPE")
    @ApiParam(value ="附件所属模块")
    private Integer attachSoftType;

    @Column(name="ATTACH_SOURCE")
    @ApiParam(value ="附件来源")
    private Integer attachSource;

    @Column(name="REF_ID")
    @ApiParam(value ="关联id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long refId;

    @Column(name="FILE_ID")
    @ApiParam(value ="文件id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long fileId;

    @Column(name="FILE_NAME_RDD")
    @ApiParam(value ="文件名称冗余")
    private String fileNameRdd;

    @Column(name="FILE_PATH_RDD")
    @ApiParam(value ="文件路径冗余")
    private String filePathRdd;
}
