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 java.io.Serializable;

/**
 * @author Wynne.Lu
 * @date 2020/9/29 17:25
 * @desc
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_LINE_OPERATION")
@Api(value = "产线 开线或停线")
public class MesLineOperation extends BaseBean implements Serializable {
    private static final long serialVersionUID = -710375930652577157L;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("产线")
    private String workCenterCode;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam("工位")
    private String workCellCode;

    @Column(name = "OBJECT_TYPE")
    @ApiParam("对象类型")
    private Integer objectType;

    /**
     * MesDataSource dsCode 或者plcCode
     */
    @Column(name = "OBJECT_CODE")
    @ApiParam("对象代码")
    private String objectCode;

    @Column(name = "OP_TYPE")
    @ApiParam("操作类型 开线、停线")
    private Integer opType;

    /**
     * 仅db  jdbc 进行行更新 example:update a set b=:b
     */
    @Column(name = "DB_OP_CMD")
    @ApiParam("db操作指令")
    private String dbOpCmd;

    /**
     * 反写plc的值
     */
    @Column(name = "PLC_OP_VALUE")
    @ApiParam("plc更新值")
    private String plcOpValue;
}
