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;

/**
 * @author wangp
 * @date 2021/3/4 16:06
 * @description 商品表
 * @since JDK 1.8
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("goods_spu")
@ApiModel(value = "Spu对象", description = "商品表")
public class Spu implements Serializable {

    /**
     * 1->已上架
     */
    public static final Integer SPU_STATUS_ON_SALE = 1;

    /**
     * NFT商品
     */
    public static final Integer SPU_TYPE_NFT = 6;

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

    public static final Integer COMMODITY_PASS_OUT = 2;

    /**
     * nft销售方式（1.原商品销售 2.拷贝销售）
     */
    public static final Integer NFT_SALES_TYPE_DEFAULT = 1;

    public static final Integer NFT_SALES_TYPE_COPY = 2;

    /**
     * 盲盒销售
     */
    public static final Integer BLIND_BOX_SALES = 4;

    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("merchant_id")
    private String merchantId;

    @ApiModelProperty(value = "商户类目")
    @TableField("category_id")
    private String categoryId;

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

    @ApiModelProperty(value = "类型  1:普通   2:预售   3:竞拍   4:秒杀 5.打包  6.NFT")
    @TableField("type")
    private Integer type;

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

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

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

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

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

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

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

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

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

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

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

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

    @ApiModelProperty(value = "退货类型")
    @TableField("return_type")
    private Integer returnType;

    @ApiModelProperty(value = "退货原因")
    @TableField("return_desc")
    private String returnReason;

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

    @ApiModelProperty(value = "审核失败原因")
    @TableField("check_fail_reason")
    private String checkFailReason;

    @ApiModelProperty(value = "溯源编号")
    @TableField("traceability_number")
    private String traceabilityNumber;

    @ApiModelProperty(value = "商品通证(0.否 1.是，自动生成Token 2.是，使用外部既有Token)")
    @TableField("commodity_pass")
    private Integer commodityPass;

    @ApiModelProperty(value = "延迟提货(0--否 1--是)")
    private Integer delayDelivery;

    @ApiModelProperty(value = "销售方式 1.普通 2.盲盒")
    private Integer salesType;

    @ApiModelProperty(value = "ntf文件")
    private String nftFile;

    @ApiModelProperty(value = "ntf文件")
    private String hash;

    @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;

    @ApiModelProperty(value = "盲盒商品难度（1-10）")
    private Integer difficulty;

    @ApiModelProperty(value = "盲盒价格")
    private BigDecimal blindBoxPrice;

    @ApiModelProperty(value = "盲盒规则")
    private String blindBoxRule;

    @ApiModelProperty(value = "预热结束时间")
    private Long preheatEndTime;
}

