1234567891011121314151617181920212223242526272829303132333435 |
- //
- // FKProductCurrentUserItem.m
- // FirstLink
- //
- // Created by jack on 16/1/20.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKProductCurrentUserItem.h"
- @implementation FKProductCurrentUserItem
- + (NSDictionary *)mts_mapping{
- return @{
- @"id": mts_key(userID),
- @"level": mts_key(level),
- @"favorite": mts_key(hasCollect),
- @"purchased_count": mts_key(purchasedCount),
- @"is_buy": mts_key(hasEverBuy),
- };
- }
- + (BOOL)mts_shouldSetUndefinedKeys{
- return NO;
- }
- - (kUserLevel)getCurrentUserLevel{
- if ([self.level isKindOfClass:[NSString class]]) {
- if (self.level.integerValue == 1) return kUserLevelNoraml;
- if (self.level.integerValue >= 2) return kUserLevelVIP;
- }
- return kUserLevelNone;
- }
- @end
|