
package com.tmerclub.cloud.search.bo;

import com.tmerclub.cloud.common.constant.Constant;
import com.tmerclub.cloud.common.model.BaseModel;
import com.tmerclub.cloud.search.canal.annotation.CanalModel;
import com.tmerclub.cloud.search.canal.common.FieldNamingPolicy;

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


/**
 * 库存信息
 *
 * @author tmerclub
 * @date 2020-11-11 13:49:06
 */
@CanalModel(database = "tmerclub" + Constant.UNDERLINE_ENV + "_product", table = "sku_stock", fieldNamingPolicy = FieldNamingPolicy.LOWER_UNDERSCORE)
public class SkuStockBO extends BaseModel implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 库存id
     */
    private Long stockId;

    /**
     * SKU ID
     */
    private Long skuId;

    /**
     * 实际库存
     */
    private Integer actualStock;

    /**
     * 锁定库存
     */
    private Integer lockStock;

    /**
     * 可售卖库存
     */
    private Integer stock;

    private Long spuId;

    /**
     * 是否已经进行分片
     */
    private Integer hasZone;

    /**
     * 剩余的分片数量
     */
    private Integer limitZone;

    public Long getStockId() {
        return stockId;
    }

    public void setStockId(Long stockId) {
        this.stockId = stockId;
    }

    public Long getSkuId() {
        return skuId;
    }

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

    public Integer getActualStock() {
        return actualStock;
    }

    public void setActualStock(Integer actualStock) {
        this.actualStock = actualStock;
    }

    public Integer getLockStock() {
        return lockStock;
    }

    public void setLockStock(Integer lockStock) {
        this.lockStock = lockStock;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public Long getSpuId() {
        return spuId;
    }

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

    public Integer getHasZone() {
        return hasZone;
    }

    public void setHasZone(Integer hasZone) {
        this.hasZone = hasZone;
    }

    public Integer getLimitZone() {
        return limitZone;
    }

    public void setLimitZone(Integer limitZone) {
        this.limitZone = limitZone;
    }

    @Override
    public String toString() {
        return "SkuStockBO{" +
                "stockId=" + stockId +
                ", skuId=" + skuId +
                ", actualStock=" + actualStock +
                ", lockStock=" + lockStock +
                ", stock=" + stock +
                ", spuId=" + spuId +
                ", hasZone=" + hasZone +
                ", limitZone=" + limitZone +
                '}';
    }
}
