//
//  GTOPioneeringSurveyItem.m
//  total
//
//  Created by freecui on 15/10/20.
//  Copyright (c) 2015年 free. All rights reserved.
//

#import "GTOPioneeringSurveyItem.h"
#import "GTOQuestionDetail.h"
#import "GTOAnswerDetail.h"

@implementation GTOPioneeringSurveyItem

- (void)setDetails:(NSArray *)details {
    if([_details isEqual:details])
        return;
    
    _details = details;
    
    for(NSDictionary *dict in details){
        GTOQuestionDetail *questionDetail = [GTOQuestionDetail DBObject];
        [questionDetail praseFromJsonDict:dict];
        
        [self.arrSubModels addObject:questionDetail];
    }
}
- (void)setResultDetails:(NSArray *)resultDetails {
    if([_resultDetails isEqual:resultDetails])
        return;
    
    _resultDetails = resultDetails;
    
    for(NSDictionary *dict in resultDetails){
        GTOAnswerDetail *answerDetail = [GTOAnswerDetail DBObject];
        [answerDetail praseFromJsonDict:dict];
        
        [self.arrSubModels addObject:answerDetail];
    }

}
@end
