package com.yiqi.order.domain.dto;

import com.google.gson.annotations.SerializedName;
import com.yiqi.common.utils.bean.BeanUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 运单收件人、寄件人信息
 * @author xiaohei
 * @date 2024/1/21
 */
@Data
public class OrderThirdDeliveryCargoDTO {
    @ApiModelProperty("包裹数量, 默认为1")
    private Integer count = 1;
    @ApiModelProperty("货物总重量，比如1.2，单位是千克(kg)")
    private Integer weight;
    @ApiModelProperty("货物长度，比如20.0，单位是厘米(cm)")
    private Integer spaceLength;
    @ApiModelProperty("货物宽度，比如15.0，单位是厘米(cm)")
    private Integer spaceWidth;
    @ApiModelProperty("货物高度，比如10.0，单位是厘米(cm)")
    private Integer spaceHeight;

    public static OrderThirdDeliveryCargoDTO buildOrderThirdDeliveryCargo(OrderGoodsOutGoodsDTO orderGoodsOutGoodsDTO){
        OrderThirdDeliveryCargoDTO orderThirdDeliveryCargoDTO = new OrderThirdDeliveryCargoDTO();
        BeanUtils.copyProperties(orderGoodsOutGoodsDTO, orderThirdDeliveryCargoDTO);
        return orderThirdDeliveryCargoDTO;
    }
}
