

//
//  CreateModel.m
//  gaotingshan
//
//  Created by MacBook Dq01 on 16/3/30.
//  Copyright © 2016年 Mac Book DQ02. All rights reserved.
//

#import "CreateModel.h"

@interface CreateModel ()

@end


@implementation CreateModel


- (id)initWithInforDic:(NSDictionary *)inforDic {
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:inforDic];
        self.eventId = [inforDic objectForKey:@"id"];
    }
    return self;
}


#pragma mark - KVC
//使用KVC赋值, 没有找到对应的key
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    //    NSLog(@"不能识别%@", key);
    //字典中是id，属性中是ID
    if ([key isEqualToString:@"id"]) {
        self.eventId = value;
    }
    
}

//使用KVC取值, 没有找到对应的key
- (id)valueForUndefinedKey:(NSString *)key {
    //    NSLog(@"不能识别%@", key);
    return nil;
}


@end
