Files
keyboard/keyBoard/Class/Login/M/KBUser.h
2025-11-13 19:07:59 +08:00

35 lines
1.2 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// KBUser.h
// 登录模块-用户模型MJExtension 解析)
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface KBUser : NSObject
// 标识
@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 *gender; // 性别(后端可能返回 string/int统一转字符串存
@property (nonatomic, copy, nullable) NSString *mobile;
@property (nonatomic, copy, nullable) NSString *email;
// 会话信息
@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
NS_ASSUME_NONNULL_END