Brak opisu

FKWantBuyItem.m 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // FKWantBuyItem.m
  3. // FirstLink
  4. //
  5. // Created by 施昌鹏 on 16/8/18.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKWantBuyItem.h"
  9. @implementation FKWantBuyItem
  10. +(NSDictionary *)mts_mapping {
  11. return @{
  12. @"storage_number" : mts_key(storageNum),
  13. @"is_instorage" : mts_key(isInstorage),
  14. @"product" : mts_key(product),
  15. @"status" : mts_key(status),
  16. @"url" : mts_key(proUrl),
  17. };
  18. }
  19. - (FkCatchState)getCatchState{
  20. if ([FLStringHelper isValidString:self.status]) {
  21. if (self.status.integerValue == 0) return FKWaitCatch;
  22. if (self.status.integerValue == 1) return FKCatching;
  23. if (self.status.integerValue == 2) return FKCatchSuccess;
  24. if (self.status.integerValue == 3) return FKCatchFail;
  25. }
  26. return FKCatchUnkown;
  27. }
  28. - (FKStorageState)getStorageState{
  29. if ([FLStringHelper isValidString:self.status]) {
  30. if (self.isInstorage.integerValue == 0) return FKWaitStorage;
  31. if (self.isInstorage.integerValue == 1) return FKInStorage;
  32. }
  33. return FKStorageStateUnkown;
  34. }
  35. @end