package cn.estsh.i3plus.ext.mes.pcn.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;

/**
 * @Author: wangjie
 * @CreateDate: 2019/7/30 9:30 AM
 * @Description:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_SHIFT_PROD", indexes = {
        @Index(columnList = "PROD_CODE")
})
@Api("班次作业项目表")
public class MesShiftProd extends BaseBean implements Serializable {

    private static final long serialVersionUID = 8428113773447371562L;

    @Column(name = "PROD_CODE")
    @ApiParam("作业内容代码")
    private String prodCode;

    @Column(name = "PROD_NAME")
    @ApiParam("作业内容名称")
    private String prodName;

    @Column(name = "PROD_CATEGORY")
    @ApiParam("作业内容分类")
    private Integer prodCategory;

    @Column(name = "IS_PROD_TIME")
    @ApiParam("是否作业时间")
    private Integer isProdTime;

    @Column(name = "PROD_TYPE")
    @ApiParam("作业类型")
    private Integer prodType;

    @Column(
            name = "PLAN_RATE",
            columnDefinition = "decimal(18,8)"
    )
    @ColumnDefault("0")
    @ApiParam("计划比例")
    private Double planRate;

}
