1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //
- // FKWantBuyItem.m
- // FirstLink
- //
- // Created by 施昌鹏 on 16/8/18.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKWantBuyItem.h"
- @implementation FKWantBuyItem
- +(NSDictionary *)mts_mapping {
- return @{
- @"storage_number" : mts_key(storageNum),
- @"is_instorage" : mts_key(isInstorage),
- @"product" : mts_key(product),
- @"status" : mts_key(status),
- @"url" : mts_key(proUrl),
- };
- }
- - (FkCatchState)getCatchState{
- if ([FLStringHelper isValidString:self.status]) {
- if (self.status.integerValue == 0) return FKWaitCatch;
- if (self.status.integerValue == 1) return FKCatching;
- if (self.status.integerValue == 2) return FKCatchSuccess;
- if (self.status.integerValue == 3) return FKCatchFail;
- }
- return FKCatchUnkown;
- }
- - (FKStorageState)getStorageState{
- if ([FLStringHelper isValidString:self.status]) {
- if (self.isInstorage.integerValue == 0) return FKWaitStorage;
- if (self.isInstorage.integerValue == 1) return FKInStorage;
- }
- return FKStorageStateUnkown;
- }
- @end
|