package com.fzm.mall.server.front.goods.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-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("goods_spu")
@ApiModel(value="Spu对象", description="商品表")
public class Spu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 1.是，自动生成Token 2.是，使用外部既有Token
     */
    public static final Integer COMMODITY_PASS_AUTO = 1;

    public static final Integer COMMODITY_PASS_OUT = 2;

    public static final Integer SPU_TYPE_NFT = 6;

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

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

    @ApiModelProperty(value = "商户编号")
    private String merchantId;

    @ApiModelProperty(value = "商品类目")
    private String categoryId;

    @ApiModelProperty(value = "物流模板id")
    private String templateId;

    @ApiModelProperty(value = "类型  1:普通   2:预售   3:竞拍   4:秒杀")
    private Integer type;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "描述")
    private String describe;

    @ApiModelProperty(value = "商品属性")
    private String prop;

    @ApiModelProperty(value = "详情")
    private String detail;

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

    @ApiModelProperty(value = "视频")
    private String video;

    @ApiModelProperty(value = "商品最贵spu价格")
    private BigDecimal maxPrice;

    @ApiModelProperty(value = "默认价格（最低的的价格）")
    private BigDecimal defaultPrice;

    @ApiModelProperty(value = "视频封面")
    private String videoPoster;

    @ApiModelProperty(value = "商品图片列表")
    private String imgList;

    @ApiModelProperty(value = "状态 0: 删除  1: 上架  2: 下架  3: 发行中  4: 失败   5:待审核   6:审核未通过")
    private Integer status;

    @ApiModelProperty(value = "积分数量")
    private Integer bpNum;

    @ApiModelProperty(value = "1-7天无理由退换货	2-自定义")
    private Boolean returnType;

    @ApiModelProperty(value = "退货描述")
    private String returnDesc;

    @ApiModelProperty(value = "商品备注")
    private String note;

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

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


}
