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

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.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.red.circle.framework.mybatis.entity.TimestampBaseEntity;
import java.io.Serial;
import java.sql.Timestamp;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户所得徽章-背包.
 * </p>
 *
 * @author pengliang
 * @since 2021-03-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_badge_backpack")
public class BadgeBackpack extends TimestampBaseEntity {

  @Serial
  private static final long serialVersionUID = 1L;

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

  /**
   * 用户.
   */
  @TableField("user_id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long userId;

  /**
   * 徽章ID.
   */
  @TableField("badge_id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long badgeId;

  /**
   * 过期类型.
   */
  @TableField("expire_type")
  private String expireType;

  /**
   * 过期时间.
   */
  @TableField("expire_time")
  private Timestamp expireTime;

  /**
   * 0.未使用 1.使用.
   */
  @TableField("is_use_props")
  private Boolean useProps;

}
