/**
 * There are <a href="https://github.com/ketayao/keta-custom">keta-custom</a> code generation
 */
package com.sw.mes.yb.accessory.entity;


import com.sw.mes.base.factory.init.entity.Equipment;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;

/**
* @Author
* @Description：wms辅料发料信息
* @Date: Create in
* @Modified By:
*/
@Data
@Entity
@Table(name="zhxx_accessory_material_out")
@DynamicUpdate
@DynamicInsert
public class AccessoryMaterialOut {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 设备
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinColumn(name = "equipment_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private Equipment equipment;

	/**
	 * 设备号(对应上面Equipment-设备编号code)
	 */
    @Column(length=50)
    private String deviceNo;

    /**
     * 辅料信息
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinColumn(name = "material_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private AccessoryMaterial material;

	/**
	 * 热场料号(对应上面AccessoryMaterial-热场编码codes)
	 */
    @Column(length=50)
    private String productNo;

	/**
	 * 数量
	 */
    @Column(length=10)
    private Integer num;

	/**
	 * 单位
	 */
    @Column(length=50)
    private String unitName;

	/**
	 * 备注
	 */
    @Column(length=255)
    private String reamrk;

	/**
	 * 唯一编码(热场条码)
	 */
    @Column(length=50)
    private String uniqueCode;

	/**
	 * 供应商
	 */
    @Column(length=50)
    private String supplierName;

	/**
	 * 批次
	 */
    @Column(length=50)
    private String batchNum;

	/**
	 * 领用人工号
	 */
    @Column(length=50)
    private String receiverCode;

	/**
	 * 领用人名称
	 */
    @Column(length=50)
    private String receiverName;

	/**
	 * 领料单号
	 */
    @Column(length=50)
    private String pickNo;

    /**
     * 出库地点
     */
    @Column(length = 11)
    private String lgort;

    /**
     * 有效运行时间
     */
    @Column
    Double useTime;

    @ManyToOne(fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinColumn(name = "spare_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private AccessorySpare accessorySpare;

    /**
     * 刻码
     */
    @Column
    private String engraving;

    /**
     * 碳毡
     */
    @Column
    private String carbonFelt;

    /**
     * 辅料类型
     */
    @Column
    private String accessoryType;

	public AccessoryMaterialOut() {
	}

	public AccessoryMaterialOut(Integer id) {
		this.id = id;
	}
}
