add test
This commit is contained in:
@@ -7,31 +7,22 @@
|
||||
//
|
||||
|
||||
#import <JSONModel/JSONModel.h>
|
||||
#import "QustionAnswer.h"
|
||||
|
||||
//内层模型
|
||||
//@protocol QustionAnswer//内层模型协议
|
||||
//@end
|
||||
@class QustionAnswer;
|
||||
|
||||
@interface QustionAnswer:JSONModel
|
||||
@property (nonatomic,copy) NSString *answer;
|
||||
@property (nonatomic,assign) int bsjz;
|
||||
@property (nonatomic,copy) NSString *createTime;
|
||||
@property (nonatomic,assign) int dryness;
|
||||
@property (nonatomic,assign) int fx;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
//外层模型
|
||||
@interface ExercisesModel : JSONModel
|
||||
@protocol QustionAnswer;//内层模型协议;
|
||||
|
||||
@property (nonatomic,strong) NSMutableArray<QustionAnswer *>* answerList;
|
||||
@interface ExercisesModel : JSONModel
|
||||
@property (nonatomic,strong) NSArray<QustionAnswer>* answerList;
|
||||
@property (nonatomic,assign) int questionType;
|
||||
//排序
|
||||
@property (nonatomic,assign) int sortNum;
|
||||
@property (nonatomic,copy) NSString *remark;
|
||||
@property (nonatomic,copy) NSString *question;
|
||||
//optionsStyle:样式(单选或滑动) 1滑动,2单选 ,3滑动带指示 ,4滑动渐变,
|
||||
@property (nonatomic,assign) int optionsStyle;
|
||||
@property (nonatomic,assign) int questionId;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -9,8 +9,14 @@
|
||||
#import "ExercisesModel.h"
|
||||
|
||||
@implementation ExercisesModel
|
||||
//+(JSONKeyMapper *)keyMapper{
|
||||
// return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{@"id":@"answer_id"}];
|
||||
//}
|
||||
|
||||
+(JSONKeyMapper *)keyMapper{
|
||||
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{@"questionId":@"id"}];
|
||||
}
|
||||
|
||||
+ (BOOL)propertyIsOptional:(NSString *)propertyName{
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// QustionAnswer.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/12.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <JSONModel/JSONModel.h>
|
||||
|
||||
@interface QustionAnswer : JSONModel
|
||||
@property (nonatomic,copy) NSString *answer;
|
||||
@property (nonatomic,assign) int bsjz;
|
||||
@property (nonatomic,copy) NSString *createTime;
|
||||
@property (nonatomic,assign) int dryness;
|
||||
@property (nonatomic,assign) int fx;
|
||||
@property (nonatomic,assign) int answer_id;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// QustionAnswer.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/12.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QustionAnswer.h"
|
||||
|
||||
@implementation QustionAnswer
|
||||
|
||||
+(JSONKeyMapper *)keyMapper{
|
||||
|
||||
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{@"answer_id":@"id"}];
|
||||
|
||||
}
|
||||
|
||||
+ (BOOL)propertyIsOptional:(NSString *)propertyName{
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user