123456789101112131415161718192021222324252627282930313233343536 |
- //
- // XSUser.m
- // XenonSDK
- //
- // Created by SAGESSE on 2019/5/29.
- // Copyright © 2019 SAGESSE. All rights reserved.
- //
- #import "XSUser.h"
- #import "XSDataCenter.h"
- @implementation XSUser
- + (BOOL)propertyIsOptional:(NSString *)propertyName {
- return YES;
- }
- NSArray* g_history;
- + (void)setHistory:(NSArray<XSUser *> *)history {
- [XSDataCenter setValue:history forKey:@"User.history"];
- g_history = history;
- }
- + (NSArray<XSUser*>*)history {
- if (g_history != nil) {
- return g_history;
- }
- g_history = [XSDataCenter valueForKey:@"User.history"];
- return g_history;
- }
- - (NSString*)name {
- return self.account ?: self.userName ?: self.uid;
- }
- @end
|