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

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

import javax.persistence.*;
import java.util.Date;

/**
 * 反馈文件日志
 *
 * @author xsl
 * @version 3.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
public class FeedbackFileLog 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 Date fileTime;
    /**
     * 上报对象编号
     */
    @Column
    private String uploadObjectNo;

    /**
     * 文件名称
     */
    @Column
    private String fileName;
    /**
     * 文件类型
     */
    @Column
    @Enumerated(EnumType.STRING)
    private FileTypeEnum fileTypeEnum;

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

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

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

}
