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.
 

59 lines
1.0 KiB

//
// TFCatalogModel.m
// TFReader
//
// Created by 谢腾飞 on 2020/12/11.
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
//
#import "TFCatalogModel.h"
@implementation TFCatalogModel
+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass
{
return @{
@"list" : TFCatalogListModel.class,
@"author" : TFCatalogAuthorModel.class
};
}
+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{
@"list" : @"chapter_list"
};
}
@end
@implementation TFCatalogAuthorModel
@end
@implementation TFCatalogListModel
+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
{
return @{
@"title" : @"chapter_title",
@"vip" : @"is_vip",
@"preview" : @"is_preview",
@"previou_chapter" : @"last_chapter"
};
}
- (BOOL)isEqual:(id)object
{
if (![object isKindOfClass:self.class]) return NO;
return [self hash] == [object hash];
}
- (NSUInteger)hash
{
return [self.chapter_id hash];
}
@end