package cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseIn.handler.OrderWarehouseInDetailsTypeHandler;
import cn.iocoder.yudao.module.order.vo.order.OrderWarehouseInDetailsVO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 到仓货物详情 DO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "ecw_order_warehouse_check", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderWarehouseCheckDO extends BaseDO {
    /**
     * 主键ID
     */
    @TableId
    private Long id;

    /**
     * 订单ID
     */
    private Long orderId;

    /**
     * 订单编号
     */
    private String orderNo;

    /**
     * 订单项id
     */
    private Long orderItemId;

    /**
     * 箱/件数
     */
    private Integer cartonsNum;

    /**
     * 所有箱内总货物数量
     */
    private Integer quantityAll;

    /**
     * 单位
     */
    private String unit;

    /**
     * 入仓规格类型  1箱/2整板 见字典 warehousing_specification_type
     */
    private Integer specificationType;

    /**
     * 箱规
     */
    private String boxGauge;

    /**
     * 体积
     */
    private BigDecimal volume;


    /**
     * 重量
     */
    private BigDecimal weight;

    /**
     * 快递单号
     */
    private String expressNo;

    /**
     * 到仓时间
     */
    private Date checkTime;

    /**
     * 到仓来源 字典order_warehouse_check_source 1-始发港入仓、2-调拨入仓、3-目的港入仓、4-退场入仓
     */
    private Integer source;


    /**
     * 备注
     */
    private String remark;

    /**
     * 入仓记录id
     */
    private Long warehouseInId;

    /**
     * 入仓纪录明细VO
     */
    @TableField(value = "order_warehouse_check_details", typeHandler = OrderWarehouseInDetailsTypeHandler.class)
    private List<OrderWarehouseInDetailsVO> orderWarehouseInDetailsVOList;

    @TableField(exist = false)
    private String locationId;
}
