把 有的数据源有, 有的数据源没有 的 属性, 变成 对象可选 属性,就没问题了。
有的数据源有, 有的数据源没有 的 属性, 作为 基本 属性,就有问题。
模型对象 的 丰富化。
#import
@class InfoModel;
@class UserModel;
@class VideoModel;
@class CommentModel;
@class ImageModel;
@class GifModel;
@protocol ListModel;
@protocol TagModel;
@protocol NSString;
@protocol CommentModel;
@interface EssenceModel : JSONModel
@property (nonatomic, strong)InfoModel *info;
@property (nonatomic, strong)NSMutableArray *list;
@end
@interface InfoModel : JSONModel
@property (nonatomic, assign)NSInteger count;
@property (nonatomic, assign)NSInteger np;
@end
@interface ListModel : JSONModel
@property (nonatomic, assign)NSInteger status;
@property (nonatomic, strong)NSString *comment;
@property (nonatomic, strong)NSArray *top_comments;//C
//视频
@property (nonatomic, strong)CommentModel *top_comment;//C
@property (nonatomic, strong)NSArray *tags;
@property (nonatomic, strong)NSString *bookmark;
@property (nonatomic, strong)NSString *text;
@property (nonatomic, strong)NSString *up;
@property (nonatomic, strong)NSString *share_url;
@property (nonatomic, assign)NSInteger down;
@property (nonatomic, assign)NSInteger forward;
@property (nonatomic, strong)UserModel *u;
@property (nonatomic, strong)NSString *passtime;
@property (nonatomic, strong)VideoModel *video;
@property (nonatomic, strong)NSString *type;
@property (nonatomic, strong)NSString *listId;
//添加一个cell的高度属性
@property (nonatomic, strong)NSNumber *cellHeight;//C
// 传值
// 把 有的数据源有, 有的数据源没有 的 属性, 变成 对象可选 属性,就没问题了。
// 有的数据源有, 有的数据源没有 的 属性, 作为 基本 属性,就有问题。
// 模型对象 的 丰富化。
@property (nonatomic, strong) ImageModel * image;//C
@property (nonatomic, strong) GifModel * gif;//C
@end
添加一个cell的高度属性
@property (nonatomic, strong)NSNumber*cellHeight;//C
传值
@interface ImageModel : JSONModel
@property (nonatomic, strong) NSArray * medium ;
@property (nonatomic, strong) NSArray * big ;
@property (nonatomic, strong) NSArray * download_url ;
@property (nonatomic, strong) NSArray * small ;
@property (nonatomic, strong) NSArray * thumbnail_small ;
@property (nonatomic, assign) NSInteger height ;
@property (nonatomic, assign) NSInteger width ;
@end
@interface GifModel : JSONModel
@property (nonatomic, strong) NSArray * images ;
@property (nonatomic, strong) NSArray * gif_thumbnail ;
@property (nonatomic, strong) NSArray * download_url ;
@property (nonatomic, assign) NSInteger height ;
@property (nonatomic, assign) NSInteger width ;
@end
@interface CommentModel : JSONModel
@property (nonatomic, assign)NSInteger voicetime;
@property (nonatomic, assign)NSInteger precid;
@property (nonatomic, strong)NSString * content;
@property (nonatomic, assign)NSInteger like_count;
@property (nonatomic, strong)UserModel *u;
@property (nonatomic, assign)NSInteger preuid;
@property (nonatomic, assign)NSInteger commentId;
@property (nonatomic, strong)NSString * passtime;
@property (nonatomic, assign)NSInteger voiceuri;
//id
@end
@interface TagModel : JSONModel
@property (nonatomic, assign)NSInteger tagId;
@property (nonatomic, strong)NSString *name;
@end
@interface UserModel : JSONModel
@property (nonatomic, strong)NSArray *header;
@property (nonatomic, strong)NSNumber *is_v;
@property (nonatomic, strong)NSString *uid;
@property (nonatomic, strong)NSNumber *is_vip;
@property (nonatomic, strong)NSString *name;
@property (nonatomic, strong)NSString *sex;
@end
@interface VideoModel : JSONModel
@property (nonatomic, assign)NSInteger playfcount;
@property (nonatomic, assign)NSInteger height;
@property (nonatomic, assign)NSInteger width;
@property (nonatomic, strong)NSArray *video;
@property (nonatomic, strong)NSArray *download;
@property (nonatomic, assign)NSInteger duration;
@property (nonatomic, assign)NSInteger playcount;
@property (nonatomic, strong)NSArray *thumbnail;
@property (nonatomic, strong)NSArray *thumbnail_small;
@end