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

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.*;
import java.util.Date;

/**
* @Author
* @Description：
* @Date: Create in
* @Modified By:
*/
@Data
@Entity
@Table(name="zhxx_accessory_apply_feedback")
@DynamicUpdate
@DynamicInsert
public class AccessoryApplyFeedback {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    
	/**
	 * 领料单号
	 */
    @Column(length=50)
    private String orderNum;
    
	/**
	 * 拒收原因
	 */
    @Column(length=255)
    private String rejectionReason;
    
	/**
	 * 拒收人
	 */
    @Column(length=50)
    private String rejectionUser;
    
	/**
	 * 拒收时间
	 */
    @Column(length=19)
	@Temporal(TemporalType.TIMESTAMP)
    private Date rejectionDate;
    
	/**
	 * 类型（1：成功；2：拒收）
	 */
    @Column(length=10)
    private Integer type;

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

	public AccessoryApplyFeedback() {
	}

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