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

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
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.Index;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description : ANDON_PLC监控记录
 * @Reference :
 * @Author : hansen.ke
 * @CreateDate : 2019-05-10 17:58
 * @Modify:
 **/
@Data
@Entity
@Table(name="ANDON_PLC_RECORD", indexes = {
        @Index(columnList = "WORK_CENTER_CODE", name = "ANDON_INDEX_WORK_CENTER_CODE"),
        @Index(columnList = "WORK_CELL_CODE", name = "ANDON_INDEX_WORK_CELL_CODE"),
        @Index(columnList = "ORGANIZE_CODE", name = "ANDON_INDEX_ORGANIZE_CODE"),
        @Index(columnList = "CHANNEL_NAME", name = "ANDON_INDEX_CHANNEL_NAME"),
        @Index(columnList = "TAG_ADDRESS", name = "ANDON_INDEX_TAG_ADDRESS"),
        @Index(columnList = "GROUP_NO", name = "ANDON_INDEX_GROUP_NO")
})
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("安灯PLC监控记录")
public class AndonPLCRecord extends BaseBean implements Serializable {

    private static final long serialVersionUID = 1593292976397416635L;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam(value = "工作中心代码")
    private String workCenterCode;

    @Column(name = "WORK_CENTER_NAME")
    @ApiParam(value = "工作中心名称")
    private String workCenterName;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam(value = "工作单元代码")
    private String workCellCode;

    @Column(name = "WORK_CELL_NAME")
    @ApiParam(value = "工作单元名称")
    private String workCellName;

    @Column(name = "NODE_CODE")
    @ApiParam(value = "控制节点代码")
    private String nodeCode;

    @Column(name = "NODE_IP")
    @ApiParam(value = "IP地址")
    private String nodeIP;

    @Column(name = "CHANNEL_NAME")
    @ApiParam(value = "通道名称")
    private String channelName;

    @Column(name = "TAG_NAME")
    @ApiParam(value = "标签名称")
    private String tagName;

    @Column(name = "TAG_ADDRESS")
    @ApiParam(value = "标签地址")
    private String tagAddress;

    @Column(name = "TAG_TYPE")
    @ApiParam(value = "标签类型")
    private String tagType;

    @Column(name = "GROUP_NO")
    @ApiParam(value = "分组号")
    private String groupNo;

    @Column(name = "TAG_VALUE")
    @ApiParam(value = "标签数值")
    private String tagValue;

    @Column(name = "TAG_POINT")
    @ApiParam(value = "传递方向")
    private String tagPoint;
}
