package com.qs.mp.user.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qs.mp.common.enums.CoinLogTypeEnum;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * @describe 用户代办流水实体类
 * @auther quanshu
 * @create 2022-03-07 20:45:43
 */
@TableName("mp_user_coin_log")
@Data
public class UserCoinLog implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 主键
   */
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  /**
   * 用户ID
   */
  @TableField("user_id")
  private Long userId;

  /**
   * 交易类型
   */
  @TableField("type")
  @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
  private CoinLogTypeEnum type;

  /**
   * 交易后余额
   */
  @TableField("money")
  private Integer money;

  /**
   * 账户增减数
   */
  @TableField("log_money")
  private Integer logMoney;

  /**
   * 收支类型
   */
  @TableField("income_expense")
  private Integer incomeExpense;

  /**
   * 备注
   */
  @TableField("log_text")
  private String logText;

  /**
   * 交易时间
   */
  @TableField("biz_time")
  private Date bizTime;

  /**
   * 关联交易ID
   */
  @TableField("ref_id")
  private String refId;

  /**
   * 创建时间
   */
  @TableField("created_time")
  private Date createdTime;

  /**
   * 更新时间
   */
  @TableField("updated_time")
  private Date updatedTime;


}
