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/3/4 16:06
 * @description 商户资产流水
 * @since JDK 1.8
 */
@Data
@TableName("merchant_assets_flow")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "MerchantAssetsFlow对象", description = "")
public class MerchantAssetsFlow implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "流水号")
    private String flowId;

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

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

    @ApiModelProperty(value = "变更资产金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "记录类型(如:0、默认值 1、提现 2、提币 3、转账)")
    private Integer type;

    @ApiModelProperty(value = "流水状态（1.失败 2.成功）")
    private Integer status;

    @ApiModelProperty(value = "资产来源(如果是RMB资产，则对方为用户编号，如果是数字资产，则为对方的数字货币地址；如果是平台，则用“平台”即可)")
    private String otherSide;

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

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

    public MerchantAssetsFlow() {
    }

    public MerchantAssetsFlow(String flowId, String merchantId, String coin, BigDecimal amount, Integer type, Integer status, String otherSide) {
        this.flowId = flowId;
        this.merchantId = merchantId;
        this.coin = coin;
        this.amount = amount;
        this.type = type;
        this.status = status;
        this.otherSide = otherSide;
    }
}
