60 lines
1.0 KiB
Objective-C
60 lines
1.0 KiB
Objective-C
//
|
|
// 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
|