//
//  courseModel.m
//  YBEducation
//
//  Created by IOS1 on 2020/3/17.
//  Copyright © 2020 IOS1. All rights reserved.
//

#import "courseModel.h"

@implementation courseModel
-(instancetype)initWithDic:(NSDictionary *)dic{
    if (self = [super init]) {
        self.user_nickname = minstr([dic valueForKey:@"user_nickname"]);
        self.avatar = minstr([dic valueForKey:@"avatar"]);
        self.userID = minstr([dic valueForKey:@"uid"]);
        self.type = minstr([dic valueForKey:@"type"]);
        self.courseID = minstr([dic valueForKey:@"id"]);
        self.sort = minstr([dic valueForKey:@"sort"]);
        self.thumb = minstr([dic valueForKey:@"thumb"]);
        self.courseName = minstr([dic valueForKey:@"name"]);
        self.paytype = minstr([dic valueForKey:@"paytype"]);
        self.payval = minstr([dic valueForKey:@"payval"]);
        self.lesson = minstr([dic valueForKey:@"lesson"]);
        self.islive = minstr([dic valueForKey:@"islive"]);
        self.ifbuy = minstr([dic valueForKey:@"isbuy"]);
        self.ismaterial = minstr([dic valueForKey:@"ismaterial"]);
        self.isSelected = [minstr([dic valueForKey:@"isselect"]) intValue];
        self.cartid = minstr([dic valueForKey:@"cartid"]);
        
    }
    return self;
}
@end
