小说绘上架版本
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// TFUserCenterModel.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 TFUserCenterListModel;
|
||||
|
||||
/// 个人中心首页
|
||||
@interface TFUserCenterModel : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSString *nickname;
|
||||
|
||||
@property (nonatomic ,copy) NSString *avatar;
|
||||
|
||||
@property (nonatomic ,copy) NSString *user_token;
|
||||
/// 主货币单位
|
||||
@property (nonatomic ,copy) NSString *masterUnit;
|
||||
/// 主货币数量
|
||||
@property (nonatomic ,assign) NSInteger masterRemain;
|
||||
/// 子货币单位
|
||||
@property (nonatomic ,copy) NSString *subUnit;
|
||||
/// 子货币数量
|
||||
@property (nonatomic ,assign) NSInteger subRemain;
|
||||
/// 月票余额
|
||||
@property (nonatomic ,assign) NSInteger ticketRemain;
|
||||
|
||||
@property (nonatomic ,assign ,getter = isVip) BOOL vip;
|
||||
|
||||
@property (nonatomic ,copy) NSString *mobile;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger uid;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger gender;
|
||||
/// 列表信息
|
||||
@property (nonatomic ,copy) NSArray<NSArray <TFUserCenterListModel *> *> *panel_list;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
/// 个人中心列表信息
|
||||
@interface TFUserCenterListModel : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSString *title;
|
||||
|
||||
@property (nonatomic ,copy) NSString *desc;
|
||||
/// 16进制颜色
|
||||
@property (nonatomic ,copy) NSString *title_color;
|
||||
/// 16进制颜色
|
||||
@property (nonatomic ,copy) NSString *desc_color;
|
||||
|
||||
@property (nonatomic ,copy) NSString *icon;
|
||||
/// 动作类型
|
||||
@property (nonatomic ,copy) NSString *action;
|
||||
|
||||
@property (nonatomic ,copy) NSString *content;
|
||||
/// 点击状态
|
||||
@property (nonatomic ,assign ,getter = isEnable) BOOL enable;
|
||||
|
||||
@property (nonatomic ,assign) NSInteger group_id;
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// TFUserCenterModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFUserCenterModel.h"
|
||||
|
||||
@implementation TFUserCenterModel
|
||||
|
||||
+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{
|
||||
@"vip" : @"is_vip",
|
||||
@"masterUnit" : @"unit",
|
||||
@"masterRemain" : @"goldRemain",
|
||||
@"subRemain" : @"silverRemain"
|
||||
};
|
||||
}
|
||||
|
||||
+ (instancetype)modelWithDictionary:(NSDictionary *)dictionary
|
||||
{
|
||||
TFUserCenterModel *t_model = [super modelWithDictionary:dictionary];
|
||||
NSMutableArray<NSArray <TFUserCenterListModel *> *> *t_list = [NSMutableArray array];
|
||||
for (NSArray *obj in t_model.panel_list) {
|
||||
NSArray<TFUserCenterListModel *> *arr = [NSArray modelArrayWithClass:TFUserCenterListModel.class json:obj];
|
||||
[t_list addObject:arr];
|
||||
}
|
||||
t_model.panel_list = t_list;
|
||||
return t_model;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation TFUserCenterListModel
|
||||
|
||||
+ (NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{
|
||||
@"enable" : @"is_click"
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// TFUserDataModel.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 TFUserDataListModel;
|
||||
// 用户资料首页数据
|
||||
@interface TFUserDataModel : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSArray<NSArray <TFUserDataListModel *> *> *panel_list;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface TFUserDataListModel : NSObject
|
||||
|
||||
@property (nonatomic ,copy) NSString *title;
|
||||
|
||||
@property (nonatomic ,copy) NSString *desc;
|
||||
|
||||
@property (nonatomic ,copy) NSString *title_color;
|
||||
|
||||
@property (nonatomic ,copy) NSString *desc_color;
|
||||
|
||||
@property (nonatomic ,copy) NSString *icon;
|
||||
|
||||
@property (nonatomic ,copy) NSString *action;
|
||||
|
||||
@property (nonatomic ,assign) BOOL is_click;
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// TFUserDataModel.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/11.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFUserDataModel.h"
|
||||
|
||||
@implementation TFUserDataModel
|
||||
|
||||
+ (instancetype)modelWithDictionary:(NSDictionary *)dictionary
|
||||
{
|
||||
NSMutableArray<NSArray <TFUserDataListModel *> *> *t_list = [NSMutableArray array];
|
||||
NSArray *t_arr = dictionary[@"panel_list"];
|
||||
for (NSArray *obj in t_arr) {
|
||||
NSArray<TFUserDataListModel *> *arr = [NSArray modelArrayWithClass:TFUserDataListModel.class json:obj];
|
||||
[t_list addObject:arr];
|
||||
}
|
||||
TFUserDataModel *t_model = [[self alloc] init];
|
||||
t_model.panel_list = [t_list copy];
|
||||
return t_model;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation TFUserDataListModel
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user