30 lines
538 B
Objective-C
30 lines
538 B
Objective-C
//
|
|
// TFBannerModel.m
|
|
// TFReader
|
|
//
|
|
// Created by 谢腾飞 on 2020/12/11.
|
|
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
|
//
|
|
|
|
#import "TFBannerModel.h"
|
|
|
|
@implementation TFBannerModel
|
|
|
|
+ (NSDictionary *)modelCustomPropertyMapper
|
|
{
|
|
return @{
|
|
@"content" :@[@"book_id", @"content"]
|
|
};
|
|
}
|
|
|
|
- (NSString *)color
|
|
{
|
|
if ([_color hasPrefix:@"#"]) {
|
|
if (_color.length >= 7) {
|
|
return [_color substringWithRange:NSMakeRange(0, 7)];
|
|
}
|
|
}
|
|
return @"#000000";
|
|
}
|
|
@end
|