-
Notifications
You must be signed in to change notification settings - Fork 5
/
AppleAccountModel.m
74 lines (71 loc) · 2.3 KB
/
AppleAccountModel.m
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
// AppleAccountModel.m
// PageCollectionView
//
// Created by yecongcong on 2017/6/22.
// Copyright © 2017年 lotogram. All rights reserved.
//
#import "AppleAccountModel.h"
@implementation AppleAccountModel
+ (AppleAccountModel *)itemWithDictionary:(NSDictionary *)dic
{
AppleAccountModel *account = [[AppleAccountModel alloc] init];
account.serial = [dic objectForKey:@"sn"];
account.ECID = [dic objectForKey:@"ecid"];
account.IMEI = [dic objectForKey:@"imei"];
account.wifiMac = [dic objectForKey:@"wifiMac"];
account.bluetoothMac = [dic objectForKey:@"bluetoothMac"];
account.uuid = [dic objectForKey:@"uuid"];
account.appleid = [dic objectForKey:@"appleid"];
account.applepwd = [dic objectForKey:@"applepwd"];
account.lotoid = [dic objectForKey:@"_id"];
account.appids = [dic objectForKey:@"appids"];
account.status = [[dic objectForKey:@"status"] integerValue];
account.holdingtime = [[dic objectForKey:@"holdingtime"] longLongValue];
account.devicename = [dic objectForKey:@"deviceName"];
account.ratedAppids = [dic objectForKey:@"rateAppids"];
account.ratingAppids = [dic objectForKey:@"ratingAppids"];
return account;
}
- (id)toDictionary
{
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
if (self.serial) {
[dict setObject:self.serial forKey:@"sn"];
}
if (self.ECID) {
[dict setObject:self.ECID forKey:@"ecid"];
}
if (self.IMEI){
[dict setObject:self.IMEI forKey:@"imei"];
}
if (self.wifiMac) {
[dict setObject:self.wifiMac forKey:@"wifiMac"];
}
if (self.bluetoothMac) {
[dict setObject:self.bluetoothMac forKey:@"bluetoothMac"];
}
if (self.uuid) {
[dict setObject:self.uuid forKey:@"uuid"];
}
if (self.appleid) {
[dict setObject:self.appleid forKey:@"appleid"];
}
if (self.applepwd) {
[dict setObject:self.applepwd forKey:@"applepwd"];
}
if (self.appids){
[dict setObject:self.appids forKey:@"appids"];
}
if (self.ratedAppids){
[dict setObject:self.ratedAppids forKey:@"rateAppids"];
}
if (self.ratingAppids){
[dict setObject:self.ratingAppids forKey:@"ratingAppids"];
}
if (self.lotoid){
[dict setObject:self.lotoid forKey:@"_id"];
}
return dict;
}
@end