YH_BarrageModel.m 1.19 KB
//
//  YH_DanMu.m
//  Yoho
//
//  Created by yujianchao on 16/6/7.
//  Copyright © 2016年 YOHO. All rights reserved.
//

#import "YH_BarrageModel.h"

@implementation YH_BarrageMsgModel

- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError *__autoreleasing *)error
{
    self = [super init];
    if (self) {
        self.avatar = [dictionaryValue objectForKey:@"avatar"];
        self.userName = [dictionaryValue objectForKey:@"name"];
        self.uid = [dictionaryValue objectForKey:@"uid"];
        self.message = [dictionaryValue objectForKey:@"msg"];
        self.cmd = [[dictionaryValue objectForKey:@"cmd"] longValue];

    } else {
//        DLog(@"初始化model出错:%@", *error);
    }
    
    return self;
}

@end


@implementation YH_BarrageJoinModel

- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError *__autoreleasing *)error
{
    self = [super initWithDictionary:dictionaryValue error:error];
    if (self) {
        self.userName = [dictionaryValue objectForKey:@"name"];
        self.uid = [dictionaryValue objectForKey:@"uid"];
    } else {
//        DLog(@"初始化model出错:%@", *error);
    }
    
    return self;
}

@end