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

import com.jiayue.ipfcst.common.data.abst.AbstractBaseEntity;
import com.jiayue.ipfcst.common.data.constant.enums.UploadFileCharSetEnum;
import com.jiayue.ipfcst.common.data.constant.enums.UploadProtocolEnum;
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
public class UploadObject 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;

    /**
     * 上报对象编号
     */
    @Column
    private String objectNo;

    /**
     * 上报文件类型 使用"，"分割
     */
    @Column
    private String uploadFileType;

    /**
     * 上报文件字符集
     */
    @Column
    @Enumerated(EnumType.STRING)
    private UploadFileCharSetEnum uploadFileCharSetEnum;

    /**
     * 上报协议
     */
    @Column
    @Enumerated(EnumType.STRING)
    private UploadProtocolEnum uploadProtocolEnum;

    /**
     * 上报D5000(1是、0否)
     */
    @Column
    private String uploadD5000;

    /**
     * 上报对象备注
     */
    @Column
    private String uploadObjectRemarks;

    /**
     * 场站编号（运维标识）
     */
    @Column
    private String stationCode;

}
