package cn.estsh.i3plus.pojo.wms.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 org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @Description : 条码补打印记录表
 * @Reference :
 * @Author : siliter
 * @CreateDate : 2019-03-21 14:50
 * @Modify:
 **/
@Data
@Entity
@Table(name = "WMS_SN_PRINT_RCD")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "条码补打印记录表", description = "条码补打印记录表")
public class WmsSnPrintRcd extends BaseBean {

    private static final long serialVersionUID = 5818946818048942479L;
    @Column(name = "WH_NO")
    @ApiParam(value = "仓库代码")
    private String whNo;

    @Column(name = "ZONE_NO")
    @ApiParam(value = "存储区编号")
    private String zoneNo;

    @Column(name = "LOCATE_NO")
    @ApiParam(value = "库位代码")
    private String locateNo;

    @Column(name = "PART_NO")
    @ApiParam(value = "物料编号")
    private String partNo;

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

    @Column(name = "SN")
    @ApiParam(value = "条码")
    private String sn;

    @Column(name = "UNIT")
    @ApiParam(value = "单位")
    private String unit;

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

    @Column(name = "PDATE")
    @ApiParam(value = "打印时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date pdate;

    @ApiParam(value = "仓库名称")
    @Transient
    public String whNameRdd;

    @ApiParam(value = "存储区名称")
    @Transient
    public String zoneNameRdd;

    @ApiParam(value = "库位名称")
    @Transient
    public String locateNameRdd;
}
