package com.yiqi.order.domain.dto;

import com.google.gson.annotations.SerializedName;
import com.yiqi.core.domain.GoodsInfo;
import com.yiqi.order.domain.OrderCloth;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author xiaohei
 * @date 2024/1/21
 */
@Data
public class OrderThirdDeliveryGoodsDTO {

    @ApiModelProperty("商品名称")
    private String goodsName;

    @ApiModelProperty("商品图片")
    private String goodsImgUrl;

    @ApiModelProperty("商品详情")
    private String goodsDesc;

    public static OrderThirdDeliveryGoodsDTO buildDeliveryGoodsInfo(GoodsInfo goodsInfo){
        OrderThirdDeliveryGoodsDTO orderThirdDeliveryGoodsDTO = new OrderThirdDeliveryGoodsDTO();
        orderThirdDeliveryGoodsDTO.setGoodsName(goodsInfo.getGoodsName());
        orderThirdDeliveryGoodsDTO.setGoodsImgUrl(goodsInfo.getGoodsImg());
        orderThirdDeliveryGoodsDTO.setGoodsDesc(goodsInfo.getGoodsSynopsis());
        return orderThirdDeliveryGoodsDTO;
    }

    public static OrderThirdDeliveryGoodsDTO buildClothGoodsInfo(OrderCloth orderCloth){
        OrderThirdDeliveryGoodsDTO orderThirdDeliveryGoodsDTO = new OrderThirdDeliveryGoodsDTO();
        orderThirdDeliveryGoodsDTO.setGoodsName("衣服");
        orderThirdDeliveryGoodsDTO.setGoodsImgUrl("https://myy-1252734862.cos.ap-shanghai.myqcloud.com/image/2023-11/thumb/ca4ed43790f840f5a9faf5a65d9acdd9.png");
        orderThirdDeliveryGoodsDTO.setGoodsDesc("待洗/洗好衣物");
        return orderThirdDeliveryGoodsDTO;
    }
}
