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

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
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;

/**
 * @author Wynne.Lu
 * @date 2020/9/27 15:59
 * @desc
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_TAKT_ALARM_RECORD", indexes = {
        @Index(columnList = "WORK_CENTER_CODE"),
        @Index(columnList = "START_TIME")
})
@Api("节拍故障报警记录")
public class MesTaktAlarmRecord extends BaseBean implements Serializable {
    private static final long serialVersionUID = 3267756779912298635L;

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

    @Column(name = "START_TIME")
    @ApiParam("开始时间")
    private String startTime;

    @Column(name = "END_TIME")
    @ApiParam("结束时间")
    private String endTime;

    @Column(name = "TAKT_SECOND")
    @ApiParam("节拍 秒数")
    private Integer taktSecond;

    @Column(name = "LEVEL_CODE")
    @ApiParam("异常等级")
    private String levelCode;

    @Column(name = "IS_PROCESSED")
    @ApiParam("是否完成")
    private Integer isProcessed = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();
}
