YH_ChannelModel.m 1.23 KB
//
//  YH_ChannelModel.m
//  YohoLive
//
//  Created by 盖剑秋 on 16/6/7.
//  Copyright © 2016年 YOHO!. All rights reserved.
//

#import "YH_ChannelModel.h"

@implementation YH_ChannelModel

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super init]) {
        _roomTitle = [aDecoder decodeObjectForKey:@"roomTitle"];
        _roomURL = [aDecoder decodeObjectForKey:@"roomURL"];
        _channel_id = [aDecoder decodeObjectForKey:@"channel_id"];
        _cid = [aDecoder decodeObjectForKey:@"cid"];
        _app = [aDecoder decodeObjectForKey:@"app"];
        _type = [aDecoder decodeObjectForKey:@"type"];
        _room = [aDecoder decodeObjectForKey:@"room"];
        _totalTime = [aDecoder decodeIntegerForKey:@"totalTime"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    
    [aCoder encodeObject:_roomTitle forKey:@"roomTitle"];
    [aCoder encodeObject:_roomURL forKey:@"roomURL"];
    [aCoder encodeObject:_channel_id forKey:@"channel_id"];
    [aCoder encodeObject:_cid forKey:@"cid"];
    [aCoder encodeObject:_app forKey:@"app"];
    [aCoder encodeObject:_type forKey:@"type"];
    [aCoder encodeObject:_room forKey:@"room"];
    [aCoder encodeInteger:_totalTime forKey:@"totalTime"];
}
@end