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

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.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

/**
 * @author Wynne.Lu
 * @date 2020/4/18 21:05
 * @desc
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "IF_PART_PULL")
@Api("IF_物料拉动")
public class IfPartPull extends BaseBean implements Serializable {

    private static final long serialVersionUID = -2733956307324895596L;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("产线")
    private String workCenterCode;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam("工位")
    private String workCellCode;

    @Column(name = "ORDER_NO")
    @ApiParam("工单号")
    private String orderNo;

    @Column(name = "PACKAGE_NO")
    @ApiParam("包装编号")
    private String packageNo;

    @Column(name = "PARENT_PART_NO")
    @ApiParam("产品物料编码")
    private String parentPartNo;

    @Column(name = "ITEM_PART_NO")
    @ApiParam("子物料编码")
    private String itemPartNo;

    @Column(name = "QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("拉动数量")
    private Double qty;

    @Column(name = "ORGANIZTION_CODE")
    @ApiParam("工厂代码")
    private String organizationCode;

    @Column(name = "SYNC_STATUS")
    @ApiParam("同步状态")
    private Integer syncStatus;

    @Column(name = "ERROR_MESSAGE")
    @ApiParam("异常消息")
    @Lob
    private String errorMessage;

    @Column(name = "ACTION_CODE")
    @ApiParam("动作代码")
    private String actionCode;

    @Column(name = "IF_CODE")
    @ApiParam("接口代码")
    private String ifCode;
}
