SPSBBaseNetworkModel.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // SPSBBaseNetworkModel.h
  3. // 我的社保
  4. //
  5. // Created by shanp on 2021/4/20.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @interface SPSBBaseNetworkModel : NSObject<NSCoding, NSCopying>
  10. #pragma mark - 字典转Model
  11. + (NSArray *)getModelListWithArray:(nullable NSArray *)array;
  12. + (id)getModelWithDictionary:(nullable NSDictionary *)dict;
  13. - (bool)handleDataWithDictionary:(nullable NSDictionary *)dict;
  14. - (id)getStringDataWithDictionary:(nullable NSDictionary *)dic variable:(NSString *)variable;
  15. //需要重写每个property时就按以下格式重写,key=>property
  16. // - (id)GETspsb_keyWithDictionary:(nullable NSDictionary *)dic key:(NSString *)key;
  17. - (bool)handleAdditionalProperty NS_REQUIRES_SUPER;
  18. #pragma mark - Model转字典
  19. + (NSArray *)getArray:(NSArray *)array;
  20. - (NSDictionary *)getDictionary;
  21. //需要重写每个property时就按以下格式重写,key=>property
  22. //- (id)GETStringWithspsb_key:(NSString *)key
  23. - (NSMutableDictionary *)handleAdditionalWithDic:(NSMutableDictionary *)dic NS_REQUIRES_SUPER;
  24. @end
  25. NS_ASSUME_NONNULL_END