-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUsers.m
More file actions
46 lines (36 loc) · 840 Bytes
/
Users.m
File metadata and controls
46 lines (36 loc) · 840 Bytes
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
//
// Users.m
// DataManager
//
// Created by Adam Chin on 6/1/15.
// Copyright (c) 2015 Adam Chin. All rights reserved.
//
#import "Users.h"
@interface Users ()
@end
@implementation Users
- (instancetype)init
{
self = [super init];
if (self)
{
self.first = @"";
self.last = @"";
self.email = @"";
self.password = @"";
self.status = @"";
self.ID = 0;
}
return self;
}
-(instancetype)initWithPayload:(NSDictionary *)payload
{
self.first = [payload valueForKey:@"first"];
self.last = [payload valueForKey:@"last"];
self.email = [payload valueForKey:@"email"];
self.password = [payload valueForKey:@"password"];
self.status = [payload valueForKey:@"status"];
self.ID = (NSInteger)[payload valueForKey:@"ID"];
return self;
}
@end