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

import cn.estsh.i3plus.pojo.wms.bean.snapshot.SnapshotBean;
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.Index;
import javax.persistence.Table;

/**
 * @Description : ERP 交易快照
 * @Reference :
 * @Author : rock.yu
 * @CreateDate : 2020-10-24 18:24
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_ERP_TRANS_SNAPSHOT", indexes = {
        @Index(columnList = "ORDER_NO"),
        @Index(columnList = "PART_NO"),
        @Index(columnList = "AREA_NO"),
        @Index(columnList = "ORGANIZE_CODE"),
        @Index(columnList = "SNAPSHOT_TIME"),
        @Index(columnList = "MOVE_TYPE")
})
public class WmsErpTransSnapshot extends SnapshotBean {
    private static final long serialVersionUID = -4095555692227226944L;

    @Column(name="SNAPSHOT_TIME")
    @ApiParam("快照时间")
    public String snapshotTime;

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

    @Column(name = "YEAR")
    @ApiParam("凭证年度")
    private String year;

    @Column(name = "ITEM")
    @ApiParam("行项目")
    private String item;

    @Column(name = "PART_NO")
    @ApiParam("零件号")
    private String partNo;

    @Column(name = "AREA_NO")
    @ApiParam("库存地点")
    private String areaNo;

    @Column(name = "QTY")
    @ApiParam("数量")
    private Double qty;

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

    @Column(name = "MOVE_TYPE")
    @ApiParam("移动类型")
    private String moveType;

    @Column(name = "KEYIN_TIME")
    @ApiParam("录入时间")
    private String keyInTime;

    @Column(name = "VENDOR_NO")
    @ApiParam("供应商编号")
    private String vendorNo;

    @Column(name = "CUSTOMER_NO")
    @ApiParam("客户编号")
    private String customerNo;

    @Column(name = "AMOUNT")
    @ApiParam("金额")
    private Double amount;

    @Column(name = "DR_AND_CR")
    @ApiParam("借贷标识：H=贷方- S=借方+")
    private String drandcr;

}
