package cn.estsh.i3plus.ext.mes.pojo.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.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Description :配置表
 * @Reference :
 * @Author : wangjie
 * @CreateDate : 2019-06-04
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_BADNESS_TYPE", indexes = {
        @Index(columnList = "BADNESS_TYPE_CODE"),
        @Index(columnList = "BADNESS_TYPE_NAME"),
        @Index(columnList = "BADNESS_TYPE_CODE, BADNESS_TYPE_NAME")
})
@Api("不良类型表")
public class MesBadnessType extends BaseBean implements Serializable {

    private static final long serialVersionUID = 3601614095816519123L;
    @Column(name = "BADNESS_TYPE_CODE")
    @ApiParam("不良类型代码")
    private String badnessTypeCode;

    @Column(name = "BADNESS_TYPE_NAME")
    @ApiParam("不良类型名称")
    private String badnessTypeName;

    @Column(name = "COLOR")
    @ApiParam("颜色 三原色：230,230,230")
    private String color;

    @Column(name = "SYSTEM_SYNC_STATUS")
    @ColumnDefault("2")
    @ApiParam("系统同步标志")
    public Integer systemSyncStatus = 2;
}
