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

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseModelBean;
import cn.estsh.i3plus.pojo.base.enumutil.AndonEnumUtil;
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;

/**
 * @Description: 自处理维护配置
 * @Reference:
 * @Author: Crish
 * @CreateDate:2019-10-19-14:56
 * @Modify:
 **/
@Data
@Entity
@Table(name="ANDON_DISPOSAL_MAINTEN_CFG")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("Andon自处理维护配置")
public class AndonDisposalMaintenCfg extends BaseBean implements Serializable {

    private static final long serialVersionUID = 474667557264134793L;

    @AnnoOutputColumn(refClass = AndonEnumUtil.ALARM_TYPE.class,refForeignKey = "value",value = "description")
    @Column(name = "ALARM_CODE")
    @ApiParam(value = "安灯类型代码")
    private String alarmCode;

    @Column(name = "RP_WHERE")
    @ApiParam(value = "有效时长")
    private Integer rpWhere;

    @Column(name = "FAIL_TIME")
    @ApiParam(value = "失败次数")
    private Integer failTime;

    @Column(name = "SUCCESS_TIME")
    @ApiParam(value = "成功次数")
    private Integer successTime;
}
