package com.red.circle.other.infra.database.rds.entity.props;

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.TimestampBaseEntity;
import java.math.BigDecimal;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 道具购买流水.
 * </p>
 *
 * @author pengliang
 * @since 2021-01-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("running_water_user_props")
public class RunningWaterUserProps extends TimestampBaseEntity {

  private static final long serialVersionUID = 1L;

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

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

  /**
   * 道具id.
   */
  @TableField("props_id")
  private Long propsId;

  /**
   * 道具购买金币.
   */
  @TableField("props_candy")
  private BigDecimal propsCandy;

  /**
   * 道具来源.
   */
  @TableField("origin")
  private String origin;

  /**
   * 天数
   */
  private Integer days;

  /**
   * 道具来源描述.
   */
  @TableField("origin_desc")
  private String originDesc;

  /**
   * 道具类型.
   */
  @TableField("type")
  private String type;

  public RunningWaterUserProps withCreateUser(Long userId) {
    this.setCreateUser(userId);
    return this;
  }
}
