package cn.estsh.i3plus.pojo.mes.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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author Wynne.Lu
 * @date 2020/8/24 17:47
 * @desc
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_SPC_KEY_DATA")
@Api("MES_SPC关键数据")
public class MesSpcKeyData extends BaseBean implements Serializable {
    private static final long serialVersionUID = 2255345691671062029L;

    @Column(name = "KD_CODE")
    @ApiParam("关键数据代码")
    private String kdCode;

    @Column(name = "KD_NAME")
    @ApiParam("关键数据名称")
    private String kdName;

    @Column(name = "NOMINAL_VALUE", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("公称值")
    private Double nominalValue;

    @Column(name = "SPEC_USL", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("规格上限")
    private Double specUsl;

    @Column(name = "SPEC_LSL", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("规格下限")
    private Double specLsl;

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

    @Column(name = "OBJECT_TYPE")
    @ApiParam("取值对象类型")
    private Integer objectType;

    @Column(name = "OBJECT_CODE")
    @ApiParam("取值对象")
    private String objectCode;

    @Column(name = "FIELD_CODE")
    @ApiParam("取值字段")
    private String fieldCode;

    @Column(name = "KD_CONDITION")
    @ApiParam("取值条件")
    private String kdCondition;
}
