
- Removed YuMi/Library/ (138 MB, not tracked) - Removed YuMi/Resources/ (23 MB, not tracked) - Removed old version assets (566 files, not tracked) - Excluded Pods/, xcuserdata/ and other build artifacts - Clean repository optimized for company server deployment
85 lines
2.0 KiB
Objective-C
85 lines
2.0 KiB
Objective-C
//
|
|
// UserInfoModel.m
|
|
// xplan-ios
|
|
//
|
|
// Created by zu on 2021/9/14.
|
|
//
|
|
|
|
#import "UserInfoModel.h"
|
|
|
|
@implementation InfoCardVO
|
|
|
|
@end
|
|
|
|
@implementation UsingPersonalBackground
|
|
|
|
@end
|
|
|
|
@implementation UserInfoModel
|
|
|
|
+ (NSDictionary *)objectClassInArray {
|
|
return @{
|
|
@"privatePhoto":UserPhoto.class,
|
|
@"userGiftWall":UserGiftWallInfoModel.class,
|
|
@"userLuckyBagGiftWall":UserGiftWallInfoModel.class,
|
|
@"dynamicInfo":MomentsInfoModel.class,
|
|
@"audioCard":XPSoundCardModel.class,
|
|
@"userNameplateList":NameplateModel.class,
|
|
@"usingPersonalBackground":UsingPersonalBackground.class,
|
|
@"infoCardVo" : InfoCardVO.class,
|
|
@"medalsPic": BaseModelVo.class
|
|
};
|
|
}
|
|
|
|
///如果一个模型中需要字段映射的话 比如id -> ID name -> other.name
|
|
+ (NSDictionary *)replacedKeyFromPropertyName {
|
|
return @{@"carEffect": @"carport.effect",
|
|
@"viewUrl": @"carport.viewUrl",
|
|
@"otherViewType": @"carport.otherViewType",
|
|
@"headwearEffect" : @"userHeadwear.effect",
|
|
@"headwearPic" : @"userHeadwear.pic",
|
|
@"headwearType" : @"userHeadwear.type",
|
|
@"carName": @"carport.name",
|
|
@"reviewingAvatar" : @"newAvatar"
|
|
};
|
|
}
|
|
|
|
- (BOOL)isUserValid {
|
|
return self.uid > 0;
|
|
}
|
|
|
|
- (NSString *)userIDString {
|
|
return [NSString stringWithFormat:@"%ld", (long)self.uid];
|
|
}
|
|
|
|
- (BOOL)isEqual:(id)object {
|
|
if (self == object) {
|
|
return YES;
|
|
}
|
|
if (![object isKindOfClass:[UserInfoModel class]]) {
|
|
return NO;
|
|
}
|
|
UserInfoModel *other = (UserInfoModel *)object;
|
|
return self.uid == other.uid &&
|
|
[self.nick isEqualToString:other.nick] &&
|
|
[self.avatar isEqualToString:self.avatar];
|
|
}
|
|
|
|
- (NSUInteger)hash {
|
|
return self.nick.hash ^ self.uid;
|
|
}
|
|
|
|
- (BOOL)isHeadWearSVGA {
|
|
return self.headwearType == 1 || self.headWearType == 1;
|
|
}
|
|
|
|
- (BOOL)isArabia {
|
|
return [self.partitionId isEqualToString:@"2"];
|
|
}
|
|
|
|
- (BOOL)isEnglish {
|
|
return [self.partitionId isEqualToString:@"1"];
|
|
}
|
|
|
|
@end
|