package com.fzm.mall.server.front.asset.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.fzm.mall.server.front.goods.model.vo.SkuVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户资产信息表
 * </p>
 *
 * @author fzm
 * @since 2021-03-01
 */
@Data
@TableName("user_asset")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="UserAsset对象", description="用户资产信息表")
public class UserAsset implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户资产表自增id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户uid")
    private String uid;

    @ApiModelProperty(value = "资产名称 如:btc、金币")
    private String coin;

    @ApiModelProperty(value = "冻结资产")
    private BigDecimal frozen;

    @ApiModelProperty(value = "可用资产")
    private BigDecimal amount;

    @ApiModelProperty(value = "信息入库时间")
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;

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

    @ApiModelProperty(value = "资产类型")
    private Integer type;

    @ApiModelProperty(value = "sku对象")
    @TableField(exist = false)
    private SkuVo skuVo;

    @ApiModelProperty(value = "库存总价")
    @TableField(exist = false)
    private BigDecimal totalPrice;


    @ApiModelProperty(value = "商品币对于skuId")
    private String goodsCoin;

    @ApiModelProperty(value = "溯源hash")
    @TableField(exist = false)
    private String hash;
}
