package cn.estsh.i3plus.ext.mes.pojo.bean;

import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
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.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description:
 * @Author: xiangming.liao
 * @Date: 2021/01/14 20:03
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PRODUCT_PRINT_TYPE", indexes = {
        @Index(columnList = "PART_NO"),
        @Index(columnList = "PART_NAME"),
        @Index(columnList = "PRINT_TYPE"),
        @Index(columnList = "PRINT_MODE"),
})
@Api("MES_产品打印类型主表")
public class MesProductPrintType extends BaseBean implements Serializable {

    private static final long serialVersionUID = -3640836053076469047L;

    @Column(name = "PART_NO")
    @ApiParam(value = "物料编码")
    private String partNo;

    @Column(name = "PART_NAME")
    @ApiParam("物料名称")
    private String partName;

    @Column(name = "PRINT_TYPE")
    @ApiParam("打印类型")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.PRINT_QUEUE_TYPE.class, refForeignKey = "value", value = "description")
    private Integer printType;

    @Column(name = "PRINT_MODE")
    @ApiParam(value = "打印方式")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.PRINT_MODE.class, refForeignKey = "value", value = "description")
    public Integer printMode;

}
