小说绘上架版本
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// TFAdvertModel.h
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/1.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFAdvertModel : NSObject
|
||||
|
||||
#pragma mark 广告相关
|
||||
@property (nonatomic ,assign) NSUInteger advert_id; // 广告id
|
||||
@property (nonatomic ,assign) NSUInteger ad_url_type; // 跳转类型 1 内部 2 外部
|
||||
@property (nonatomic ,copy) NSString *ad_title; // 广告标题
|
||||
@property (nonatomic ,copy) NSString *ad_image; // 广告图片
|
||||
@property (nonatomic ,copy) NSString *ad_skip_url; // 广告跳转地址
|
||||
@property (nonatomic ,copy) NSString *ad_key;
|
||||
@property (nonatomic ,assign) NSUInteger ad_type; // 广告类型 0 不显示 1 内部广告 2 穿山甲广告
|
||||
@property (nonatomic ,assign) NSInteger ad_width;
|
||||
@property (nonatomic ,assign) NSInteger ad_height;
|
||||
// 当前时间戳
|
||||
@property (nonatomic ,copy) NSString *timestamp;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// TFAdvertModel.m
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/1.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFAdvertModel.h"
|
||||
|
||||
@implementation TFAdvertModel
|
||||
|
||||
+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{
|
||||
@"timestamp" : @"time"
|
||||
};
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// TFBannerModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFBannerModel : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSString *content; // 根据动作类型对于的漫画则为漫画id
|
||||
@property (nonatomic ,copy) NSString *name; //作品名
|
||||
@property (nonatomic ,copy) NSString *image; // 封面
|
||||
@property (nonatomic ,copy) NSString *color; // 封面的背景色
|
||||
@property (nonatomic ,assign) NSInteger action; // 动作类型, 1:跳漫画,2:scheme跳转,3:外部链接
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// TFBookMarkModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFBookMarkModel : NSObject
|
||||
/// 书籍ID
|
||||
@property (nonatomic ,copy) NSString *bookID;
|
||||
/// 书签页内容
|
||||
@property (nonatomic ,copy) NSString *pageContent;
|
||||
/// 章节标题
|
||||
@property (nonatomic ,copy) NSString *chapterTitle;
|
||||
/// 章节id
|
||||
@property (nonatomic ,copy) NSString *chapterID;
|
||||
/// 章节排序
|
||||
@property (nonatomic ,assign) NSInteger chapterSort;
|
||||
/// 章节内容索引
|
||||
@property (nonatomic ,assign) NSInteger specificIndex;
|
||||
/// 书签加入时间戳
|
||||
@property (nonatomic ,copy) NSString *timestamp;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// TFBookMarkModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFBookMarkModel.h"
|
||||
|
||||
@implementation TFBookMarkModel
|
||||
|
||||
- (BOOL)isEqual:(id)object
|
||||
{
|
||||
if (![object isKindOfClass:self.class]) return NO;
|
||||
return [self hash] == [object hash];
|
||||
}
|
||||
|
||||
- (NSUInteger)hash
|
||||
{
|
||||
return [self modelHash];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// TFCatalogModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class TFCatalogListModel, TFCatalogAuthorModel;
|
||||
|
||||
@interface TFCatalogModel : NSObject
|
||||
|
||||
@property (nonatomic ,assign) NSInteger total_chapter;
|
||||
|
||||
@property (nonatomic ,strong) TFCatalogAuthorModel *author;
|
||||
|
||||
@property (nonatomic ,copy) NSArray<TFCatalogListModel *> *list;
|
||||
|
||||
@end
|
||||
|
||||
@interface TFCatalogAuthorModel : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSString *author_name;
|
||||
|
||||
@property (nonatomic ,copy) NSString *author_note;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger author_id;
|
||||
|
||||
@property (nonatomic ,copy) NSString *author_avatar;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface TFCatalogListModel : NSObject
|
||||
|
||||
/// 章节id
|
||||
@property (nonatomic ,copy) NSString *chapter_id;
|
||||
|
||||
/// 下一章章节id
|
||||
@property (nonatomic ,copy) NSString *next_chapter;
|
||||
|
||||
/// 上一章章节id
|
||||
@property (nonatomic ,copy) NSString *previou_chapter;
|
||||
|
||||
@property (nonatomic ,copy) NSString *book_id;
|
||||
|
||||
/// 章节标题
|
||||
@property (nonatomic ,copy) NSString *title;
|
||||
|
||||
/// 字数
|
||||
@property (nonatomic ,copy) NSString *words;
|
||||
|
||||
@property (nonatomic ,assign ,getter = isVip) BOOL vip;
|
||||
|
||||
/// 章节更新时间:时间戳
|
||||
@property (nonatomic ,copy) NSString *update_time;
|
||||
|
||||
@property (nonatomic ,copy) NSString *tab;
|
||||
|
||||
/// tab颜色,默认是16进制色值
|
||||
@property (nonatomic ,copy) NSString *color;
|
||||
|
||||
/// 当前章节在整个章节中的顺序
|
||||
@property (nonatomic ,assign) NSInteger display_order;
|
||||
|
||||
@property (nonatomic ,assign) BOOL can_read;
|
||||
|
||||
@property (nonatomic ,assign ,getter = isPreview) BOOL preview;
|
||||
|
||||
@property (nonatomic ,copy) NSString *author_note;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger comment_num;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger ticket_num;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger reward_num;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// TFCheckSettingModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class AdStatusSetting, SystemSetting, VersionUpdate, StartPage, TFProtocolListModel;
|
||||
|
||||
@interface TFCheckSettingModel : NSObject
|
||||
|
||||
@property (nonatomic ,strong) AdStatusSetting *ad_status_setting;
|
||||
|
||||
@property (nonatomic ,strong) SystemSetting *system_setting;
|
||||
|
||||
@property (nonatomic ,strong) VersionUpdate *version_update;
|
||||
|
||||
@property (nonatomic ,strong) StartPage *start_page;
|
||||
/** 微信获取 access_token 的方法前缀 */
|
||||
@property (nonatomic ,copy) NSString *wechatTokenURL;
|
||||
|
||||
@property (nonatomic ,strong) TFProtocolListModel *protocol_list;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface AdStatusSetting : NSObject
|
||||
|
||||
@property (nonatomic ,assign) BOOL chapter_read_end; // 章节阅读末尾是否开启
|
||||
|
||||
@property (nonatomic ,assign) BOOL chapter_read_bottom; // 章节阅读器底部是否开启
|
||||
|
||||
@property (nonatomic ,assign) BOOL comic_read_end; // 漫画章节末尾
|
||||
|
||||
/// 激励视频广告开关
|
||||
@property (nonatomic ,assign) BOOL video_ad_switch;
|
||||
|
||||
/// 激励视频展示文字
|
||||
@property (nonatomic ,copy) NSString *video_ad_text;
|
||||
|
||||
/// 免广告总时长
|
||||
@property (nonatomic ,assign) NSInteger ad_free_time;
|
||||
|
||||
/// 隔X页插入广告
|
||||
@property (nonatomic ,assign) NSInteger ad_page_num;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface SystemSetting : NSObject
|
||||
|
||||
@property (nonatomic ,assign) NSInteger check_status; // 过审状态开关 1-开启 0-关闭
|
||||
@property (nonatomic ,strong) NSArray <NSString *>*site_type; // 新版UI状态,1:小说,2:漫画,3:有声
|
||||
@property (nonatomic ,copy) NSString *currencyUnit; // 主货币
|
||||
@property (nonatomic ,copy) NSString *subUnit; // 子货币
|
||||
@property (nonatomic ,copy) NSString *vip_send_switch; // 是否开启注册送会员弹框 1 开 2 关
|
||||
@property (nonatomic ,copy) NSString *project_type; // 项目状态 是否展示漫画小说
|
||||
@property (nonatomic ,assign) NSInteger ai_switch; // ai读书开关 1 开 2 关
|
||||
@property (nonatomic ,assign) NSInteger novel_reward_switch; // 阅读器打赏显示开关 1开
|
||||
@property (nonatomic ,assign) NSInteger monthly_ticket_switch; // 阅读器月票显示开关 1开
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface VersionUpdate : NSObject
|
||||
|
||||
@property (nonatomic ,assign) NSInteger status; // 更新状态 1 弱更新 2 强更新
|
||||
@property (nonatomic ,copy) NSString *msg; // 更新文案
|
||||
@property (nonatomic ,copy) NSString *url; // 更新跳转链接
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface StartPage : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSString *title; // 广告标题
|
||||
@property (nonatomic ,copy) NSString *content; // 广告内容
|
||||
@property (nonatomic ,copy) NSString *image; // 自带广告展示图片地址
|
||||
@property (nonatomic ,assign) NSInteger skip_type; // 点击跳转类型 1 - 跳转小说 2 - 应用内打开链接 3 - 跳转漫画 4 - 浏览器打开链接 5 - 穿山甲广告 6 - 谷歌广告 7 - 广点通广告 8 - 跳转有声
|
||||
@property (nonatomic ,copy) NSString *ad_key; // 开屏广告key
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface TFProtocolListModel : NSObject
|
||||
|
||||
/// 用户服务协议
|
||||
@property (nonatomic ,copy) NSString *notify;
|
||||
/// 隐私政策
|
||||
@property (nonatomic ,copy) NSString *privacy;
|
||||
/// 注销协议
|
||||
@property (nonatomic ,copy) NSString *logoff;
|
||||
/// 用户协议
|
||||
@property (nonatomic ,copy) NSString *user;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// TFCheckSettingModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFCheckSettingModel.h"
|
||||
|
||||
@implementation TFCheckSettingModel
|
||||
|
||||
+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
||||
return @{
|
||||
@"ad_status_setting" : [AdStatusSetting class],
|
||||
@"system_setting" : [SystemSetting class],
|
||||
@"version_update" : [VersionUpdate class],
|
||||
@"start_page" : [StartPage class],
|
||||
@"protocol_list" : TFProtocolListModel.class
|
||||
};
|
||||
}
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper {
|
||||
return @{
|
||||
@"wechatTokenURL" : @"wechat_api_url"
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation AdStatusSetting
|
||||
|
||||
+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{
|
||||
@"ad_page_num" : @"book_read_gap"
|
||||
};
|
||||
}
|
||||
|
||||
- (BOOL)chapter_read_bottom
|
||||
{
|
||||
if ([TFNetworkManager networkingStatus]) {
|
||||
return _chapter_read_bottom;
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)chapter_read_end
|
||||
{
|
||||
if ([TFNetworkManager networkingStatus]) {
|
||||
return _chapter_read_end;
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation SystemSetting
|
||||
|
||||
@end
|
||||
|
||||
@implementation VersionUpdate
|
||||
|
||||
@end
|
||||
|
||||
@implementation StartPage
|
||||
|
||||
@end
|
||||
|
||||
@implementation TFProtocolListModel
|
||||
|
||||
- (NSString *)user {
|
||||
if (_user) {
|
||||
if ([_user containsString:@"?"]) {
|
||||
return [_user stringByAppendingFormat:@"&language=%@", TFLanguageManager.serverLocalized];
|
||||
} else {
|
||||
return [_user stringByAppendingFormat:@"?language=%@", TFLanguageManager.serverLocalized];
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *)logoff {
|
||||
if (_logoff) {
|
||||
if ([_privacy containsString:@"?"]) {
|
||||
return [_logoff stringByAppendingFormat:@"&language=%@", TFLanguageManager.serverLocalized];
|
||||
} else {
|
||||
return [_logoff stringByAppendingFormat:@"?language=%@", TFLanguageManager.serverLocalized];
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *)privacy {
|
||||
if (_privacy) {
|
||||
if ([_privacy containsString:@"?"]) {
|
||||
return [_privacy stringByAppendingFormat:@"&language=%@", TFLanguageManager.serverLocalized];
|
||||
} else {
|
||||
return [_privacy stringByAppendingFormat:@"?language=%@", TFLanguageManager.serverLocalized];
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *)notify {
|
||||
if (_notify) {
|
||||
if ([_notify containsString:@"?"]) {
|
||||
return [_notify stringByAppendingFormat:@"&language=%@", TFLanguageManager.serverLocalized];
|
||||
} else {
|
||||
return [_notify stringByAppendingFormat:@"?language=%@", TFLanguageManager.serverLocalized];
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// TFPagingModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFPagingModel : NSObject
|
||||
|
||||
// 总页数
|
||||
@property (nonatomic ,assign) NSInteger current_page;
|
||||
// 当前页数
|
||||
@property (nonatomic ,assign) NSInteger total_page;
|
||||
// 全部页总数量
|
||||
@property (nonatomic ,assign) NSInteger total_count;
|
||||
// 当前页总数量
|
||||
@property (nonatomic ,assign) NSInteger page_size;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// TFPagingModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFPagingModel.h"
|
||||
|
||||
@implementation TFPagingModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// TFProductionChapterModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class TFImageListModel;
|
||||
|
||||
@interface TFProductionChapterModel : NSObject
|
||||
|
||||
/*
|
||||
公共使用区域
|
||||
**/
|
||||
@property (nonatomic ,assign) NSInteger production_id; // 作品id
|
||||
|
||||
@property (nonatomic ,assign) NSInteger chapter_id; // 章节id
|
||||
|
||||
@property (nonatomic ,strong) NSArray <NSString *>* chapter_ids; // 章节合集
|
||||
|
||||
@property (nonatomic ,assign) NSInteger relation_production_id; // 关联作品id
|
||||
|
||||
@property (nonatomic ,copy) NSString *name; // 作品名称
|
||||
|
||||
@property (nonatomic ,copy) NSString *chapter_title; // 章节标题
|
||||
|
||||
@property (nonatomic ,copy) NSString *subtitle; // 章节子标题
|
||||
|
||||
@property (nonatomic ,assign) NSInteger total_words; // 全部字数
|
||||
|
||||
@property (nonatomic ,copy) NSString *cover; // 封面
|
||||
|
||||
@property (nonatomic ,assign) NSInteger is_preview; // 是否预览内容 1-是 0-不是
|
||||
|
||||
@property (nonatomic ,copy) NSString *display_order; // 章节序号
|
||||
|
||||
@property (nonatomic ,assign) NSInteger last_chapter; // 上一章节id 没有上一章时返回0
|
||||
|
||||
@property (nonatomic ,assign) NSInteger next_chapter; // 下一章id 没有下一章时返回0
|
||||
|
||||
@property (nonatomic ,copy) NSString *play_num; // 观看次数
|
||||
|
||||
@property (nonatomic ,assign) NSInteger hot_num; // 热度值
|
||||
|
||||
@property (nonatomic ,assign) BOOL is_vip; // 是否是vip可观看
|
||||
|
||||
@property (nonatomic ,assign) BOOL can_read; // 是否可读
|
||||
|
||||
@property (nonatomic ,copy) NSString *update_time; // 章节更新时间
|
||||
|
||||
@property (nonatomic ,strong) TFTagModel *tag; // 标签
|
||||
|
||||
@property (nonatomic ,strong) TFAdvertModel *advert; // 广告
|
||||
|
||||
/// 总章节数
|
||||
@property (nonatomic ,assign) NSInteger total_chapters;
|
||||
|
||||
/*
|
||||
小说专属
|
||||
**/
|
||||
|
||||
@property (nonatomic ,copy) NSString *content; // 章节内容
|
||||
|
||||
@property (nonatomic ,copy) NSString *author_note; // 章节作者寄语
|
||||
|
||||
@property (nonatomic ,copy) NSString *comment_num; // 评论数,为Null时不展示
|
||||
|
||||
@property (nonatomic ,copy) NSString *ticket_num; // 月票数,为Null时不展示
|
||||
|
||||
@property (nonatomic ,copy) NSString *reward_num; // 打赏数,为Null时不展示
|
||||
|
||||
/*
|
||||
漫画专属
|
||||
**/
|
||||
|
||||
@property (nonatomic ,assign) NSInteger vip_images; // 会员章节数
|
||||
|
||||
@property (nonatomic ,assign) NSInteger free_image_num; // 免费阅读图片数
|
||||
|
||||
@property (nonatomic ,assign) NSInteger total_images; // 全部图片数
|
||||
|
||||
@property (nonatomic ,assign) NSInteger total_comment; // 总评论数
|
||||
|
||||
@property (nonatomic ,copy) NSString *display_label; // 序号标题
|
||||
|
||||
@property (nonatomic ,strong) NSArray <TFImageListModel *>*image_list; // 图片合集
|
||||
|
||||
/*
|
||||
有声专属
|
||||
**/
|
||||
@property (nonatomic ,copy) NSString *duration_time; // 音频时长
|
||||
|
||||
@property (nonatomic ,assign) NSInteger duration_second; // 音频时长 秒
|
||||
|
||||
@property (nonatomic ,assign) CGFloat size; // 音频文件大小 单位:KB
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@interface TFImageListModel : NSObject
|
||||
|
||||
@property (nonatomic ,assign) NSInteger image_id;
|
||||
|
||||
@property (nonatomic ,copy) NSString *image;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger width;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger height;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger image_update_time;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// TFProductionChapterModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFProductionChapterModel.h"
|
||||
|
||||
@implementation TFProductionChapterModel
|
||||
|
||||
+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass
|
||||
{
|
||||
return @{@"tag" : [TFTagModel class],
|
||||
@"advert" : [TFAdvertModel class],
|
||||
@"image_list" : [TFImageListModel class]
|
||||
};
|
||||
}
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{
|
||||
@"production_id":@[@"book_id", @"comic_id", @"audio_id"],
|
||||
@"relation_production_id":@"relation_book_id",
|
||||
@"total_words":@"words",
|
||||
@"name" :@[@"name", @"title", @"book_name", @"comic_name", @"audio_name"],
|
||||
@"cover":@[@"cover", @"small_cover"]
|
||||
};
|
||||
}
|
||||
|
||||
- (void)setAuthor_note:(NSString *)author_note
|
||||
{
|
||||
_author_note = author_note;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation TFImageListModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{
|
||||
@"image_update_time":@"update_time"
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// TFProductionListModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "TFPagingModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class TFProductionModel;
|
||||
|
||||
@interface TFProductionListModel : TFPagingModel
|
||||
|
||||
@property (nonatomic ,strong) NSArray <TFProductionModel *>*list;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// TFProductionListModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFProductionListModel.h"
|
||||
|
||||
@implementation TFProductionListModel
|
||||
|
||||
+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass
|
||||
{
|
||||
return @{@"list" : [TFProductionModel class]};
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// TFProductionModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "TFAdvertModel.h"
|
||||
#import "TFCatalogModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class TFTagModel, TFProductionChapterModel;
|
||||
|
||||
@interface TFProductionModel : TFAdvertModel <NSCopying>
|
||||
|
||||
@property (nonatomic ,assign) NSInteger production_id; // 作品id
|
||||
|
||||
@property (nonatomic ,assign) NSUInteger log_id; // 阅读记录id
|
||||
|
||||
@property (nonatomic ,copy) NSString *name; // 作品名
|
||||
|
||||
@property (nonatomic ,copy) NSString *flag; // 作品角标
|
||||
|
||||
@property (nonatomic ,copy) NSString *cover; // 封面
|
||||
|
||||
@property (nonatomic ,copy) NSString *horizontal_cover; // 横封面
|
||||
|
||||
@property (nonatomic ,copy) NSString *vertical_cover; // 竖封面
|
||||
|
||||
@property (nonatomic ,copy) NSString *author; // 作者
|
||||
|
||||
@property (nonatomic ,copy) NSString *author_name; // 作品封面作家名称
|
||||
|
||||
@property (nonatomic ,copy) NSString *author_note; // 作品封面作家的话
|
||||
|
||||
@property (nonatomic ,assign) NSInteger author_id; // 作品封面作家id
|
||||
|
||||
@property (nonatomic ,copy) NSString *author_avatar; // 作品封面作家头像
|
||||
|
||||
@property (nonatomic ,copy) NSString *finished; // 连载状态
|
||||
|
||||
@property (nonatomic ,copy) NSString *visited; // 访问数
|
||||
|
||||
@property (nonatomic ,copy) NSString *total_favors; // 全部收藏数
|
||||
|
||||
@property (nonatomic ,assign) NSInteger free_chapters; // 免费章节数
|
||||
|
||||
@property (nonatomic ,assign) NSInteger total_comment; // 作品评论人数
|
||||
|
||||
@property (nonatomic ,copy) NSString *issue_time; // 发布时间
|
||||
|
||||
@property (nonatomic ,copy) NSString *hot_num; // 热度值
|
||||
|
||||
@property (nonatomic ,copy) NSString *production_descirption; // 作品简介
|
||||
|
||||
@property (nonatomic ,copy) NSString *last_chapter_time; // 最新更新时间
|
||||
|
||||
@property (nonatomic ,copy) NSString *last_chapter; //最新章节名
|
||||
|
||||
@property (nonatomic ,copy) NSString *record_title; // 阅读记录章节名称
|
||||
|
||||
@property (nonatomic ,assign) NSInteger total_chapters; // 全部章节数
|
||||
|
||||
|
||||
@property (nonatomic ,assign) BOOL is_readed; // 是否已读
|
||||
|
||||
@property (nonatomic ,assign) BOOL is_baoyue; // 是否是vip作品
|
||||
|
||||
@property (nonatomic ,assign) BOOL is_recommend; // 是否是推荐作品
|
||||
|
||||
@property (nonatomic ,assign) NSString *display_no; // 榜单列表用于排序使用(只有榜单列表会使用)
|
||||
|
||||
|
||||
@property (nonatomic ,assign) TFProductionType productionType; // 作品类别
|
||||
|
||||
@property (nonatomic ,strong) NSArray <TFProductionChapterModel *> *chapter_list; // 章节目录
|
||||
|
||||
@property (nonatomic ,copy) NSArray<TFCatalogListModel *> *list; // 新章节目录
|
||||
|
||||
@property (nonatomic ,strong) NSArray <TFTagModel *> *tag; // 作品标签 没有标签时为空数组
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// TFProductionModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFProductionModel.h"
|
||||
|
||||
@implementation TFProductionModel
|
||||
|
||||
+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass
|
||||
{
|
||||
return @{
|
||||
@"tag" : [TFTagModel class],
|
||||
@"chapter_list" : [TFProductionChapterModel class],
|
||||
@"list" : [TFCatalogListModel class],
|
||||
};
|
||||
}
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{
|
||||
@"production_descirption" :@"description",
|
||||
@"visited" :@"view",
|
||||
@"record_title" :@"chapter_title",
|
||||
@"production_id" :@[@"book_id", @"comic_id", @"audio_id"],
|
||||
@"name" :@[@"name", @"title", @"book_name", @"comic_name", @"audio_name"],
|
||||
@"total_chapters" :@[@"total_chapters", @"total_chapter"]
|
||||
};
|
||||
}
|
||||
|
||||
- (id)copyWithZone:(NSZone *)zone
|
||||
{
|
||||
return [self modelCopy];
|
||||
}
|
||||
|
||||
- (NSString *)production_descirption
|
||||
{
|
||||
_production_descirption = [_production_descirption stringByReplacingOccurrencesOfString:@"\r" withString:@""];
|
||||
|
||||
return _production_descirption;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// TFSignModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class TFProductionModel;
|
||||
@interface TFSignModel : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSString *award;
|
||||
@property (nonatomic ,copy) NSString *sign_days;
|
||||
@property (nonatomic ,copy) NSString *tomorrow_award;
|
||||
@property (nonatomic ,strong) NSArray <TFProductionModel *> *book;
|
||||
@property (nonatomic ,strong) NSArray <TFProductionModel *> *comic;
|
||||
@property (nonatomic ,strong) NSArray <TFProductionModel *> *audio;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// TFSignModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFSignModel.h"
|
||||
|
||||
@implementation TFSignModel
|
||||
|
||||
+ (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass
|
||||
{
|
||||
return @{@"book" : [TFProductionModel class],
|
||||
@"comic" : [TFProductionModel class],
|
||||
@"audio" : [TFProductionModel class]
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// TFTagModel.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFTagModel : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSString *color;
|
||||
|
||||
@property (nonatomic ,copy) NSString *tab;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// TFTagModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFTagModel.h"
|
||||
|
||||
@implementation TFTagModel
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user