YH_BarrageModel.m
1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// 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