This commit is contained in:
2025-12-02 20:33:17 +08:00
parent c56655c728
commit 2f55e7bfa1
12 changed files with 83 additions and 133 deletions

View File

@@ -11,22 +11,16 @@ NS_ASSUME_NONNULL_BEGIN
// 标识
@property (nonatomic, copy, nullable) NSString *userId; // id/user_id/uid
@property (nonatomic, copy, nullable) NSString *appleUserId; // 用 Apple 登录返回的 userID可选
// 基本信息
@property (nonatomic, copy, nullable) NSString *nickname;
@property (nonatomic, copy, nullable) NSString *avatar; // 头像 URL
@property (nonatomic, copy, nullable) NSString *nickName;
@property (nonatomic, copy, nullable) NSString *avatarUrl; // 头像 URL
@property (nonatomic, copy, nullable) NSString *gender; // 性别(后端可能返回 string/int统一转字符串存
@property (nonatomic, copy, nullable) NSString *mobile;
@property (nonatomic, copy, nullable) NSString *email;
/// 邮箱是否验证
@property (nonatomic, assign) BOOL emailVerified;
// 会话信息
@property (nonatomic, copy, nullable) NSString *token; // token/access_token/accessToken
@property (nonatomic, copy, nullable) NSString *refreshToken; // refresh_token/refreshToken
@property (nonatomic, strong, nullable) NSDate *expiryDate; // 若后端返回过期时间,转为日期
/// 从后端返回(可能顶层或 data/user 嵌套)中解析用户模型。内部使用 MJExtension。
+ (instancetype)userFromResponseObject:(id)jsonObject;
@end