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

import com.tmerclub.cloud.common.model.BaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
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
 */
@Data
@ToString
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;

}
