package com.zanxiang.mybatis.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; import org.apache.logging.log4j.util.Strings; import java.math.BigDecimal; import java.time.LocalDateTime; /** * @author : lingfeng * @time : 2022-06-06 * @description : 玩家表 */ @Data @NoArgsConstructor @AllArgsConstructor @ToString @Builder @TableName("t_user") public class User { /** * id */ @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 所属渠道ID */ private Long agentId; /** * 注册游戏id */ private Long gameId; /** * 用户名 */ private String username; /** * 昵称 */ private String nickname; /** * 密码 */ private String password; /** * 绑定邮箱 */ private String email; /** * 绑定手机号码 */ private String mobile; /** * 绑定支付宝账号 */ private String aliPay; /** * 客户端类型, 1 : 安卓app */ private Integer deviceType; /** * 用户状态, -1 : 为冻结状态, 0 : 为正常状态 */ private Integer status; /** * 头像 */ private String avatar; /** * 充值次数 */ private Integer rechargeCount; /** * 充值金额 */ private BigDecimal rechargeMoney; /** * 最近充值时间 */ private LocalDateTime lastRechargeTime; /** * 平台币余额 */ private BigDecimal platformCoin; /** * 创角数 */ private Integer roleCount; /** * 是否GS */ private Boolean isGs; /** * 客服id */ private Long customerId; /** * 拥有角色最高vip等级 */ private Integer vipMax; /** * 是否实名认证,0未实名认证,1成年人,2未成年人 */ private Integer authentication; /** * 注册时间 */ private LocalDateTime createTime; /** * 更改时间 */ private LocalDateTime updateTime; /** * 客户端操作系统, android, ios, windows, mac */ private String deviceSystem; /** * 用户设备mac地址 */ private String mac; /** * 设备唯一编号IMEI */ private String imei; /** * 安卓id, (仅安卓设备才有值) */ private String androidId; /** * 用户注册ip */ private String ip; /** * 归因广告id */ private String adId; /** * 获取用户显示手机号 * * @return : 用户显示手机号 */ public String getShowPhoneNum() { if (Strings.isBlank(this.mobile)) { return null; } return this.mobile.substring(0, 3) + "****" + this.mobile.substring(mobile.length() - 4); } }