package com.jiayue.ipfcst.common.data.entity;

import com.jiayue.ipfcst.common.data.abst.AbstractBaseEntity;
import com.jiayue.ipfcst.common.data.constant.enums.FileStatusEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.core.annotation.Order;

import javax.persistence.*;


/**
 * 上报文件日志明细
 *
 * @author xsl
 * @version 3.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(indexes = {@Index(columnList = "createTime",name="ufld_ct_idx")})
public class UploadFileLogDetail extends AbstractBaseEntity {
    private static final long serialVersionUID = 1L;

    @Id
    @Order(1)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "myid")
    @GenericGenerator(name = "myid", strategy = "com.jiayue.ipfcst.common.data.entity.id.CustomIDGenerator")
    private Integer id;

    /**
     * 上报对象名称(记录哪个通道上报的文件)
     */
    @Column
    private String uploadObjectName;

    /**
     * 通道主键ID(记录哪个通道上报的文件)
     */
    @Column
    private Integer uploadChanneId;

    /**
     * 上报通道名称(记录哪个通道上报的文件)
     */
    @Column
    private String uploadChannelName;

    /**
     * 文件日志主键ID
     */
    @Column
    private Integer uploadFileLogId;

    /**
     * 文件名称
     */
    @Column
    private String fileName;

    /**
     * 交互时间
     */
    @Column
    private Long uploadTime;

    /**
     * 上报状态
     */
    @Column
    @Enumerated(EnumType.STRING)
    private FileStatusEnum fileStatusEnum;

    /**
     * 失败原因
     */
    @Column
    private String uploadFailureReason;
}
