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.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 : ANDON_呼叫通知配置
 * @Reference :
 * @Author : hansen.ke
 * @CreateDate : 2019-05-13 9:53
 * @Modify:
 **/
@Data
@Entity
@Table(name="ANDON_ALARM_RESPONSE_CFG")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("ANDON_呼叫通知配置")
public class AndonAlarmResponseCfg extends BaseBean  implements Serializable {

    private static final long serialVersionUID = 4302725908675374347L;

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

    @AnnoOutputColumn(refClass = AndonEnumUtil.ANDON_ACTION_TAG.class,refForeignKey = "code",value = "description")
    @Column(name = "ANDON_STATUS")
    @ApiParam(value = "安灯状态")
    private String andonStatus;

    @Column(name = "RP_WHERE")
    @ApiParam(value = "通知时间")
    private String rpWhere;

    @AnnoOutputColumn(refClass = AndonEnumUtil.NOTICE_MESSAGE_SEND_TYPE.class,refForeignKey = "value",value = "description")
    @Column(name = "RP_CODE")
    @ApiParam(value = "通知方式代码")
    private String rpCode;

    @Column(name = "RP_OBJECT_CODE")
    @ApiParam(value = "通知对象")
    private String rpObjectCode;

    @AnnoOutputColumn(refClass = AndonEnumUtil.NOTICE_MESSAGE_SEND_LEVEL.class,refForeignKey = "value",value = "description")
    @Column(name = "RP_LEVEL")
    @ApiParam(value = "通知级别")
    private String rpLevel;

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

    @AnnoOutputColumn(hidden = true)
    @Column(name = "WORK_CENTER_NAME_RDD")
    @ApiParam(value = "工作中心名称")
    private String workCenterNameRdd;
}
