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_CLASSIFY_DETAIL", indexes = {
        @Index(columnList = "BADNESS_CLASSIFY_CODE"),
        @Index(columnList = "BADNESS_CLASSIFY_NAME"),
        @Index(columnList = "BADNESS_CLASSIFY_DETAIL_CODE"),
        @Index(columnList = "BADNESS_CLASSIFY_DETAIL_NAME"),
        @Index(columnList = "BADNESS_CLASSIFY_DETAIL_CODE, BADNESS_CLASSIFY_DETAIL_NAME")
})
@Api("不良分类明细表")
public class MesBadnessClassifyDetail extends BaseBean implements Serializable {

    private static final long serialVersionUID = -5513605644942914005L;
    @Column(name = "BADNESS_CLASSIFY_CODE")
    @ApiParam("不良分类代码")
    private String badnessClassifyCode;

    @Column(name = "BADNESS_CLASSIFY_NAME")
    @ApiParam("不良分类名称")
    private String badnessClassifyName;

    @Column(name = "BADNESS_CLASSIFY_DETAIL_CODE")
    @ApiParam("不良分类明细代码")
    private String badnessClassifyDetailCode;

    @Column(name = "BADNESS_CLASSIFY_DETAIL_NAME")
    @ApiParam("不良分类明细名称")
    private String badnessClassifyDetailName;

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

}
