
package com.tmerclub.cloud.api.product.dto;

import com.tmerclub.cloud.common.model.BaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 出入库商品项DTO
 *
 * @author lhd
 * @date 2022-06-22 16:57:27
 */
@Data
public class StockBillLogItemDTO extends BaseModel implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    public StockBillLogItemDTO() {

    }
    public StockBillLogItemDTO(Long spuId, Long skuId, Long shopId, Long orderId, String spuName, String skuName, Integer stockCount, Long unitPrice, String partyCode, String mainImgUrl) {
        this.spuId = spuId;
        this.skuId = skuId;
        this.shopId = shopId;
        this.orderId = orderId;
        this.spuName = spuName;
        this.skuName = skuName;
        this.stockCount = stockCount;
        this.unitPrice = unitPrice;
        this.partyCode = partyCode;
        this.mainImgUrl = mainImgUrl;
    }

    @Schema(description = "出入库明细id")
    private Long stockBillLogId;

    @Schema(description = "商品id")
    private Long spuId;
    @Schema(description = "skuId")
    private Long skuId;

    @Schema(description = "店铺Id")
    private Long shopId;

    @Schema(description = "订单id")
    private Long orderId;

    @Schema(description = "库存仓库id")
    private Long stockPointId;

    @Schema(description = "商品名称")
    private String spuName;

    @Schema(description = "商品sku名称")
    private String skuName;

    @Schema(description = "实际出入库数量")
    private Integer stockCount;

    @Schema(description = "商品库存剩余量")
    private Integer afterStock;

    @Schema(description = "成本单价")
    private Long unitPrice;

    @Schema(description = "商品编码")
    private String partyCode;
    @Schema(description = "商品图片")
    private String mainImgUrl;

    @Schema(description = "发货方式 1.供应商发货 2.仓库发货")
    private Integer supplierDeliveryType;

    @Schema(description = "供应商id")
    private Long supplierId;

    @Schema(description = "类型，1：出库 2：入库")
    private Integer stocktype;

    @Schema(description = "单据类型")
    private Integer stockBillType;

    @Schema(description = "库存点类型")
    private Integer stockPointType;

    @Schema(description = "制单人手机号")
    private String makerMobile;


    @Override
    public String toString() {
        return "StockBillLogItemDTO{" +
                "stockBillLogId=" + stockBillLogId +
                ", spuId=" + spuId +
                ", skuId=" + skuId +
                ", shopId=" + shopId +
                ", orderId=" + orderId +
                ", stockPointId=" + stockPointId +
                ", spuName='" + spuName + '\'' +
                ", skuName='" + skuName + '\'' +
                ", stockCount=" + stockCount +
                ", afterStock=" + afterStock +
                ", unitPrice=" + unitPrice +
                ", partyCode='" + partyCode + '\'' +
                ", mainImgUrl='" + mainImgUrl + '\'' +
                ", supplierDeliveryType=" + supplierDeliveryType +
                ", supplierId=" + supplierId +
                ", stocktype=" + stocktype +
                ", stockBillType=" + stockBillType +
                ", stockPointType=" + stockPointType +
                ", makerMobile='" + makerMobile + '\'' +
                '}';
    }
}
