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

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

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-08-10
 */
@Data
@TableName("external_token")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ExternalToken对象", description = "外部商品通证")
public class ExternalToken implements Serializable {

    private static final long serialVersionUID = 1L;

    //未绑定
    public static final Integer UNBIND = 0;
    //已绑定
    public static final Integer BIND = 1;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "编号")
    private String commodityPassId;

    @ApiModelProperty(value = "标识名称")
    private String labelName;

    @ApiModelProperty(value = "nft真实id")
    private Long tokenId;

    @ApiModelProperty(value = "通证类型 0:FT(ERC20) 1:NFT(ERC721)")
    private Integer goodsType;

    @ApiModelProperty(value = "通证名称")
    private String name;

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

    @ApiModelProperty(value = "绑定商品名称")
    private String goodsName;

    @ApiModelProperty(value = "发行时间")
    private Long publishTime;

    @ApiModelProperty(value = "发行者")
    private String publisher;

    @ApiModelProperty(value = "可用数量")
    private BigDecimal availableNumber;

    @ApiModelProperty(value = "已绑定数量")
    private BigDecimal bindNumber;

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

    @ApiModelProperty(value = "状态(0.未绑定 1.已绑定)")
    private Integer status;

    @ApiModelProperty(value = "(1.token 2.coin 3.nft)")
    private Integer type;

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

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

    @ApiModelProperty(value = "商户id")
    private String hash;
}
