package cn.estsh.i3plus.pojo.mes.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.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @Author: Wynne.Lu
 * @CreateDate: 2019/9/24 7:12 PM
 * @Description:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DATA_OBJECT")
@Api("数据对象")
public class MesDataObject extends BaseBean implements Serializable {

    private static final long serialVersionUID = -6422621561140177350L;
    @Column(name = "OBJECT_CODE")
    @ApiParam("对象代码")
    private String objectCode;

    @Column(name = "OBJECT_NAME")
    @ApiParam("对象名称")
    private String objectName;

    @Column(name = "DS_CODE")
    @ApiParam("数据源代码")
    private String dsCode;

    @Column(name = "OPERATE_TYPE")
    @ApiParam("操作类型")
    private Integer operateType;

    @Column(name = "FIELD_PK")
    @ApiParam("主键")
    private String fieldPk;

    @Column(name = "READ_FLAG_VALUE")
    @ApiParam("读取标志值")
    private String readFlagValue;

    @Column(name = "FEED_FIELD")
    @ApiParam("反馈字段")
    private String feedField;

    @Column(name = "FEED_VALUE")
    @ApiParam("反馈值")
    private String feedValue;

    @Column(name = "SELF_ADDITION")
    @ApiParam("自增列")
    private String selfAddition;

    @Column(name = "SELF_ADDITION_VALUE")
    @ApiParam("自增列值")
    private Long selfAdditionValue;

    @Column(name = "ORDER_BY_FIELD")
    @ApiParam("采集排序字段")
    private String orderbyField;

    @Column(name = "ORDER_BY_VALUE")
    @ApiParam("采集排序值")
    private Integer orderbyValue;

    @Transient
    @ApiParam("操作类型名称")
    private String operateTypeName;
}
