//
// MJTg.m
// 01-test
#import <Foundation/Foundation.h>
#import "MJTg.h"
@implementation MJTg
-(instancetype)initWithDict:(NSDictionary *)dict
{
if (self = [super init]) {
[self setValuesForKeysWithDictionary:dict];
}
return self;
}
+(instancetype)tgWithDict:(NSDictionary *)dict
{
MJTg *tg = [MJTg new];
tg.title = [dict objectForKey:@"title"];
tg.icon = [dict objectForKey:@"icon"];
tg.buyCount = [dict objectForKey:@"buyCount"];
tg.price = [dict objectForKey:@"price"];
return tg;
}
@end