package com.red.circle.wallet.infra.database.rds.entity;

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.red.circle.framework.mybatis.entity.BaseEntity;
import java.io.Serial;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户金币资产流水.
 * </p>
 *
 * @author pengliang on 2023/06/30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wallet_gold_asset_record")
public class WalletGoldAssetRecord extends BaseEntity {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 流水记录ID.
   */
  @TableId(value = "id", type = IdType.INPUT)
  private Long id;

  /**
   * 系统来源.
   */
  @TableField("sys_origin")
  private String sysOrigin;

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

  /**
   * 金额.
   */
  @TableField(value = "penny_amount")
  private Long pennyAmount;

  /**
   * 当前余额.
   */
  @TableField(value = "penny_balance")
  private Long pennyBalance;

  /**
   * 类型0.收入 1.消耗.
   */
  @TableField("type")
  private Integer type;

  /**
   * 事件类型.
   */
  @TableField("event_type")
  private String eventType;

  /**
   * 事件描述.
   */
  @TableField("event_desc")
  private String eventDesc;

  /**
   * 事件id(订单，关联信息).
   */
  @TableField("event_id")
  private String eventId;

  /**
   * 操作用户类型(0.app用户， 1.后台管理用户).
   */
  @TableField("op_user_type")
  private Integer opUserType;

}
