package cn.estsh.i3plus.pojo.wms.bean;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
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.Table;

/**
 * @Description : 物料关系表
 * @Reference :
 * @Author : jimmy.zeng
 * @CreateDate : 2019-09-27 14:44
 * @Modify:
 **/
@Data
@Entity
@Table(name="WMS_PART_RELATION")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value="物料关系表",description = "物料关系表")
public class WmsPartRelation extends BaseBean {

    private static final long serialVersionUID = -3532040201124896970L;
    @Column(name = "PART_NO")
    @ApiParam(value = "物料编码")
    private String partNo;

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

    @Column(name = "ASSOCIATE_CODE")
    @ApiParam(value = "关联代码")
    private String associateCode;

    @Column(name = "ASSOCIATE_NAME_ADD")
    @ApiParam(value = "关联名称")
    private String associateNameAdd;

    @Column(name = "ASSOCIATE_TYPE")
    @ApiParam(value = "关联类型")
    @AnnoOutputColumn(refClass = WmsEnumUtil.PART_ASSOCIATE_TYPE.class, refForeignKey = "value", value = "description")
    private Integer associateType;

}
