InventoryUnfreezeOrderListModel.m 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // InventoryUnfreezeOrderListModel.m
  3. // IBOSS
  4. //
  5. // Created by 关宏厚 on 2020/5/18.
  6. // Copyright © 2020 elongtian. All rights reserved.
  7. //
  8. #import "InventoryUnfreezeOrderListModel.h"
  9. @implementation InventoryUnfreezeOrderListModel
  10. /*!
  11. * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的
  12. * 前:模型的属性 后:字典里的属性
  13. */
  14. + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
  15. return @{
  16. @"unfreezeId":@"UnFreezeID",
  17. @"unfreezeNo":@"UnFreezeNo",
  18. @"freezeNo":@"FreezeNo",
  19. @"unfreezeFlag":@"UnFreezeFlag",
  20. @"accountDate":@"AccountDate",
  21. @"approver":@"UserName",
  22. @"invoiceStatusName":@"InvoiceStatusName",
  23. @"invoiceLayoutName":@"InvoiceLayoutName",
  24. @"invoiceStatus":@"Status"
  25. };
  26. }
  27. /*!
  28. * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
  29. * NSDate *time dic[@"t"]是double类型的的秒数
  30. */
  31. /// Dic -> model
  32. - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
  33. _accountDate=[dic objectForKey:@"AccountDate"];
  34. _accountDate =[DateFormat dateFormatSplit:_accountDate];
  35. return YES;
  36. }
  37. @end