You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.1 KiB

//
// IJIMDataModel.h
// Jimu
//
// Created by 冯鸿杰 on 17/2/10.
// Copyright © 2017年 Mob. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
*/
@protocol IMOBFDataModel <NSObject>
@required
/**
@param dict
@return
*/
- (instancetype)initWithDict:(NSDictionary *)dict;
/**
@param data
@param key
*/
- (void)set:(id)data key:(NSString *)key;
/**
@param key
*/
- (id)get:(NSString *)key;
/**
@return
*/
- (NSDictionary *)dictionaryValue;
/**
:,,使initWithDict初始化时,;key ,value为需要映射的字段
@return
*/
+ (NSDictionary <NSString *, NSString *> *)propertyMappingDictionary;
/**
,MOBFDataModel时,
@property NSArray <OtherDataModel *> *array;
, @{@"array" : @"OtherDataModel"}
@return
*/
+ (NSDictionary <NSString *, NSString *> *)elementTypeOfCollectionPropertyDictionary;
/**
nil
@param rawData
@param targetType
@param propertyName
@return
*/
+ (id)unsupportTypeWithRawData:(id)rawData
targetType:(Class)targetType
propertyName:(NSString *)propertyName;
/**
nil
@param object
@param propertyName
@return NSDictionaryNSArrayNSStringNSNumber类型的返回
*/
+ (id)rawDataWithUnsupportTypeObject:(id)object
propertyName:(NSString *)propertyName;
@end