package com.fzm.mall.server.admin.goods_center.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 商品规格表
 * </p>
 *
 * @author fzm
 * @since 2021-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("goods_sku")
@ApiModel(value = "Sku对象", description = "商品规格表")
public class Sku implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "商品编号")
    @TableField("goods_id")
    private String goodsId;

    @ApiModelProperty(value = "规格编号")
    @TableField("sku_id")
    private String skuId;

    @ApiModelProperty(value = "原价")
    @TableField("original_price")
    private BigDecimal originalPrice;

    @ApiModelProperty(value = "现价 / 促销价")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty(value = "销量")
    @TableField("sales")
    private Long sales;

    @ApiModelProperty(value = "库存")
    @TableField("stock")
    private Long stock;

    @ApiModelProperty(value = "发行量")
    @TableField("circulation")
    private Long circulation;

    @ApiModelProperty(value = "重量")
    @TableField("weight")
    private BigDecimal weight;

    @ApiModelProperty(value = "外部token编号")
    @TableField("commodity_pass_id")
    private String commodityPassId;

    @ApiModelProperty(value = "商品货币名称")
    @TableField("coin_name")
    private String coinName;

    @ApiModelProperty(value = "规格缩略图")
    @TableField("thumb")
    private String thumb;

    @ApiModelProperty(value = "规格图片列表")
    @TableField("img_list")
    private String imgList;

    @ApiModelProperty(value = "状态 0: 删除  1: 有效  2: 发行失败")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "发行错误信息")
    @TableField("err_msg")
    private String errMsg;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;


}
