package com.fzm.mall.server.admin.finance_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;

/**
 * @author wangp
 * @date 2021/4/29 15:53
 * @description 商户资产
 * @since JDK 1.8
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("merchant_assets")
@ApiModel(value = "MerchantAssets对象", description = "")
public class MerchantAssets implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

    @ApiModelProperty(value = "如果是RMB资产，则账户可以不填写，如果是数字货币，则填写数字货币账户地址")
    private String account;

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

    @ApiModelProperty(value = "可用余额")
    private BigDecimal amount;

    @ApiModelProperty(value = "冻结余额")
    private BigDecimal frozen;

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

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

    public MerchantAssets() {
    }

    public MerchantAssets(String merchantId, String account, String coin, BigDecimal amount) {
        this.merchantId = merchantId;
        this.account = account;
        this.coin = coin;
        this.amount = amount;
    }
}
