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

import cn.estsh.i3plus.pojo.mes.bean.MesProdBindRecord;
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.*;
import java.io.Serializable;

/**
 * @Description :产品绑定记录表拓展
 * @Reference :
 * @Author : wangjie
 * @CreateDate : 2019-04-02
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PROD_BIND_RECORD_EXT",indexes = {
        @Index(columnList = "ORGANIZE_CODE_EXT"),
        @Index(columnList = "CREATE_DATE_TIME_EXT"),
        @Index(columnList = "MODIFY_DATE_TIME_EXT"),
        @Index(columnList = "PRODUCT_SN"),
        @Index(columnList = "THIRD_PARTY_PID")
})
@PrimaryKeyJoinColumn(name = "PID")
@Api("产品绑定记录表拓展")
public class MesProdBindRecordExt extends MesProdBindRecord implements Serializable {

    private static final long serialVersionUID = -2753076357996362766L;

    @Column(name = "PROCESS_CODE")
    @ApiParam("工序代码")
    private String processCode;

    @Column(name = "PROCESS_NAME")
    @ApiParam("工序名称")
    private String processName;

    @Column(name = "MEMO")
    @ApiParam("备注")
    private String memo;

    @Column(name="ORGANIZE_CODE_EXT")
    @ApiParam(value ="组织代码")
    public String organizeCodeExt;

    @Column(name="IS_VALID_EXT")
    @ApiParam(value = "有效性")
    public Integer isValidExt;

    @Column(name="IS_DELETED_EXT")
    @ApiParam(value = "是否已删除")
    public Integer isDeletedExt;

    @Column(name="CREATE_USER_EXT")
    @ApiParam(value = "创建用户")
    public String createUserExt;

    @Column(name="CREATE_DATE_TIME_EXT")
    @ApiParam(value = "创建日期")
    public String createDatetimeExt;

    @Column(name="MODIFY_USER_EXT")
    @ApiParam(value = "修改人")
    public String modifyUserExt;

    @Column(name="MODIFY_DATE_TIME_EXT")
    @ApiParam(value = "修改日期")
    public String modifyDatetimeExt;

    @Column(name = "PRODUCT_SN")
    @ApiParam("产品条码")
    private String productSn;

    @Column(name = "PART_NAME_RDD")
    @ApiParam("物料名称")
    private String partNameRdd;

    @Column(name = "MANAGE_CODE")
    @ApiParam(value = "管理编码")
    private String manageCode;

    @Column(name = "THIRD_PARTY_PID")
    @ApiParam("关联ID")
    private String thirdPartyPid;

}
