package cn.ysk.cashier.mybatis.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 会员积分
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 2.0 2024-10-25
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_shop_user")
public class TbMemberPoints {
	private static final long serialVersionUID = 1L;

	/**
	* id
	*/
	@TableId(type = IdType.AUTO)
	private Long id;
	/**
	* 店铺id
	*/
	private Long shopId;
	/**
	* 会员id
	*/
	@TableField(value = "id", insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
	private Long memberId;
	/**
	* 会员名称
	*/
	@TableField("name")
	private String memberName;
	/**
	* 会员头像
	*/
	@TableField("head_img")
	private String avatarUrl;
	/**
	* 手机号码
	*/
	@TableField("telephone")
	private String mobile;
	/**
	* 账户积分
	*/
	@TableField("account_points")
	private Integer accountPoints;
	/**
	* 最近一次积分变动时间
	*/
	@TableField("last_points_change_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date lastPointsChangeTime;
	/**
	* 最近一次浮动积分
	*/
	@TableField("last_float_points")
	private Integer lastFloatPoints;
	/**
	 * 是否会员 1-是 0-否
	 */
	@TableField("is_vip")
	private Integer vip;
}