package com.qs.mp.user.domain.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.qs.mp.common.annotation.Excel;
import com.qs.mp.user.domain.UserDeliverOrderItem;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author 用户提货订单物流信息
 * @Date 2022/3/17
 */
@Data
@ApiModel("用户提货订单项VO")
public class UserDeliverOrderItemVO extends UserDeliverOrderItem {

    @ApiModelProperty("商品编号")
    private String goodsCode;

    @ApiModelProperty("sku编号")
    private String skuCode;

    @ApiModelProperty("金额")
    private Integer price;

    @JSONField(serialize = false)
    @ApiModelProperty("商品价值")
    private Integer goodsValue;

    @ApiModelProperty("商品成本")
    private Integer goodsCost;

    @JSONField(serialize = false)
    @ApiModelProperty("sku价值")
    private Integer skuValue;

    @ApiModelProperty("sku成本")
    private Integer skuCost;

    @ApiModelProperty("供应商名称")
    private String supplierName;

    @ApiModelProperty("物流公司名称")
    private String companyName;

    /**
     * 公司主页
     */
    @ApiModelProperty("公司主页")
    private String companyHomeUrl;

    /**
     * 物流查询接口
     */
    @ApiModelProperty("物流查询接口")
    private String queryUrl;

    public Integer getPrice() {
        if (this.skuValue == null) {
            return this.goodsValue;
        }
        return skuValue;
    }
}
