package com.qs.mp.channel.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;
import com.qs.mp.common.enums.ChannelGoodsSettleStatusTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @describe 商品库实体类
 * @auther quanshu
 * @create 2023-06-07 01:13:35
 */
@TableName("mp_channel_goods")
@Data
public class ChannelGoods implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 渠道ID
     */
    @TableField("channel_id")
    private Long channelId;

    /**
     * 关联商品id
     */
    @TableField("goods_id")
    private Long goodsId;

    /**
     * 门店采购商品订单id
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 商品标题
     */
    @TableField("title")
    private String title;

    /**
     * 商品图片
     */
    @TableField("pic_url")
    private String picUrl;

    /**
     * 商品类型:1采购商品
     */
    @TableField("type")
    private Integer type;

    /**
     * 关联id couponId
     */
    @TableField("ref_id")
    private String refId;

    /**
     * 经销商进货价格
     */
    @TableField("purchase_price")
    private Integer purchasePrice;

    /**
     * 采购商品经销商采购成本
     */
    @TableField("purchase_cost")
    private Integer purchaseCost;

    /**
     * 库存数量
     */
    @TableField("quantity")
    private Integer quantity;

    /**
     * 已销数量
     */
    @TableField("verify_qty")
    private Integer verifyQty;

    /**
     * 剩余库存
     */
    @TableField("remain_qty")
    private Integer remainQty;

    /**
     * 结算库存
     */
    @TableField("settle_qty")
    private Integer settleQty;

    /**
     * 结算状态，1未结算2已结算
     */
    @TableField("status")
    @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
    private ChannelGoodsSettleStatusTypeEnum status;

    /**
     * 供应商id
     */
    @TableField("supplier_id")
    private Long supplierId;

    /**
     * 排序权重，越大越靠前
     */
    @TableField("sort_weight")
    private Integer sortWeight;

    /**
     * 是否多sku，0否，1是
     */
    @TableField("multi_sku")
    private Integer multiSku;

    /**
     * sku规格值描述
     */
    @TableField("sku_prop")
    private String skuProp;

    /**
     * skuID
     */
    @TableField("sku_id")
    private Long skuId;

    /**
     * sku 属性
     */
    @TableField("properties")
    @ApiModelProperty("sku 属性")
    private String properties;

    /**
     * 逻辑删除标识
     */
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;

    /**
     * 创建时间
     */
    @TableField("created_time")
    private Date createdTime;

    /**
     * 更新时间
     */
    @TableField("updated_time")
    private Date updatedTime;

    /**
     * 采购商品结算时间
     */
    @TableField("settle_time")
    private Date settleTime;


}