package com.tmerclub.cloud.product.bo.mongo;

import com.tmerclub.cloud.common.model.BaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;

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

/**
 * 对应MongoDB存储出入库商品emp
 *
 * @author track
 */
public class MongoStockBillLogItemBO extends BaseModel implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "skuId")
    private Long skuId;

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

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

    @Schema(description = "sku有图片使用sku图片，否则使用商品主图")
    private String mainImgUrl;

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

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

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

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

    /**
     * 初始化后可以删掉此字段
     */
    @Schema(description = "出入库明细id")
    private Long stockBillLogId;

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public String getSpuName() {
        return spuName;
    }

    public void setSpuName(String spuName) {
        this.spuName = spuName;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getMainImgUrl() {
        return mainImgUrl;
    }

    public void setMainImgUrl(String mainImgUrl) {
        this.mainImgUrl = mainImgUrl;
    }

    public Long getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Long unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Integer getStockCount() {
        return stockCount;
    }

    public void setStockCount(Integer stockCount) {
        this.stockCount = stockCount;
    }

    public Integer getAfterStock() {
        return afterStock;
    }

    public void setAfterStock(Integer afterStock) {
        this.afterStock = afterStock;
    }

    public String getPartyCode() {
        return partyCode;
    }

    public void setPartyCode(String partyCode) {
        this.partyCode = partyCode;
    }

    public Long getStockBillLogId() {
        return stockBillLogId;
    }

    public void setStockBillLogId(Long stockBillLogId) {
        this.stockBillLogId = stockBillLogId;
    }

    @Override
    public String toString() {
        return "MongoStockBillLogItemBO{" +
                "spuId=" + spuId +
                ", skuId=" + skuId +
                ", spuName='" + spuName + '\'' +
                ", skuName='" + skuName + '\'' +
                ", mainImgUrl='" + mainImgUrl + '\'' +
                ", unitPrice=" + unitPrice +
                ", stockCount=" + stockCount +
                ", afterStock=" + afterStock +
                ", partyCode='" + partyCode + '\'' +
                ", stockBillLogId=" + stockBillLogId +
                '}';
    }
}
