- Fix vari
This commit is contained in:
1 parent
c3e77e7a09
commit
e2e17186ac
30 files changed
+1254
-873
No files matched your search
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// PNAddress.h
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 13/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import <PNObject/PNObject.h>
|
||||
#import "PNLocation.h"
|
||||
|
||||
@interface PNAddress : PNObject <PNObjectSubclassing>
|
||||
|
||||
@property (nonatomic, strong) NSString *country;
|
||||
@property (nonatomic, strong) NSString *province;
|
||||
@property (nonatomic, strong) NSString *city;
|
||||
@property (nonatomic, strong) NSString *street;
|
||||
@property (nonatomic, strong) NSNumber *number;
|
||||
@property (nonatomic, strong) NSString *zip;
|
||||
@property (nonatomic, strong) NSString *istruction;
|
||||
@property (nonatomic, strong) PNLocation *location;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// PNAddress.m
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 13/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import "PNAddress.h"
|
||||
|
||||
@implementation PNAddress
|
||||
|
||||
+ (NSString *) objectClassName {
|
||||
return @"Address";
|
||||
}
|
||||
|
||||
+ (NSDictionary *) objcetMapping {
|
||||
NSDictionary *mapping = @{@"country":@"country",
|
||||
@"province":@"province",
|
||||
@"city":@"city",
|
||||
@"street":@"street",
|
||||
@"number":@"number",
|
||||
@"zip":@"zip",
|
||||
@"location":@{@"key":@"location",@"type":@"PNLocation"},
|
||||
};
|
||||
return mapping;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// PNLocation.h
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 13/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import <PNObject/PNObject.h>
|
||||
|
||||
@interface PNLocation : PNObject <PNObjectSubclassing>
|
||||
|
||||
@property (nonatomic) CGFloat lat;
|
||||
@property (nonatomic) CGFloat lng;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// PNLocation.m
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 13/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import "PNLocation.h"
|
||||
|
||||
@implementation PNLocation
|
||||
|
||||
+ (NSString *) objectClassName {
|
||||
return @"Location";
|
||||
}
|
||||
|
||||
|
||||
+ (NSDictionary *) objcetMapping {
|
||||
NSDictionary *mapping = @{@"lat":@"lat",
|
||||
@"lng":@"lng",
|
||||
};
|
||||
return mapping;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// PNUser.h
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 08/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import <PNObject/PNObject.h>
|
||||
#import "PNAddress.h"
|
||||
|
||||
@interface PNUser : PNObject <PNObjectSubclassing>
|
||||
|
||||
@property (strong, nonatomic) NSString *userId;
|
||||
@property (strong, nonatomic) NSString *firstName;
|
||||
@property (strong, nonatomic) NSString *lastName;
|
||||
@property (nonatomic, strong) NSString *profileImage;
|
||||
@property (nonatomic, strong) NSString *sex;
|
||||
@property (nonatomic, strong) NSDate *birthDate;
|
||||
@property (nonatomic, strong) NSString *phone;
|
||||
@property (nonatomic) BOOL hasAcceptedPrivacy;
|
||||
@property (nonatomic) BOOL hasAcceptedNewsletter;
|
||||
@property (nonatomic) BOOL hasVerifiedEmail;
|
||||
@property (nonatomic, strong) NSDate *emailVerifiedDate;
|
||||
@property (nonatomic, strong) NSString *email;
|
||||
@property (strong, nonatomic) NSString *username;
|
||||
@property (nonatomic) BOOL publicProfile;
|
||||
@property (nonatomic) NSInteger loginCount;
|
||||
@property (strong, nonatomic) NSDate *createdAt;
|
||||
@property (nonatomic, strong) NSString *facebookId;
|
||||
@property (nonatomic, strong) NSString *facebookAccessToken;
|
||||
@property (nonatomic, strong) PNAddress *address;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// PNUser.m
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 08/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import "PNUser.h"
|
||||
|
||||
@implementation PNUser
|
||||
|
||||
/*
|
||||
@property (strong, nonatomic) NSString *userId;
|
||||
@property (strong, nonatomic) NSString *firstName;
|
||||
@property (strong, nonatomic) NSString *lastName;
|
||||
@property (nonatomic, strong) NSString *profileImage;
|
||||
@property (nonatomic, strong) NSString *sex;
|
||||
@property (nonatomic, strong) NSDate *birthDate;
|
||||
@property (nonatomic, strong) NSString *phone;
|
||||
@property (nonatomic) BOOL hasAcceptedPrivacy;
|
||||
@property (nonatomic) BOOL hasAcceptedNewsletter;
|
||||
@property (nonatomic) BOOL hasVerifiedEmail;
|
||||
@property (nonatomic, strong) NSDate *emailVerifiedDate;
|
||||
@property (nonatomic, strong) NSString *email;
|
||||
@property (strong, nonatomic) NSString *username;
|
||||
@property (nonatomic) BOOL publicProfile;
|
||||
@property (nonatomic) NSInteger loginCount;
|
||||
@property (strong, nonatomic) NSDate *createdAt;
|
||||
@property (nonatomic, strong) NSString *facebookId;
|
||||
@property (nonatomic, strong) NSString *facebookAccessToken;
|
||||
@property (nonatomic, strong) PNAddress *address;
|
||||
*/
|
||||
|
||||
+ (NSDictionary *)objcetMapping {
|
||||
NSDictionary *mapping = @{@"userId":@"id",
|
||||
@"firstName":@"firstName",
|
||||
@"lastName":@"lastName",
|
||||
@"profileImage":@"profileImage",
|
||||
@"sex":@"sex",
|
||||
@"birthDate":@"birthDate",
|
||||
@"phone":@"phone",
|
||||
@"hasAcceptedPrivacy":@"hasAcceptedPrivacy",
|
||||
@"hasAcceptedNewsletter":@"hasAcceptedNewsletter",
|
||||
@"hasVerifiedEmail":@"hasVerifiedEmail",
|
||||
@"emailVerifiedDate":@"emailVerifiedDate",
|
||||
@"email":@"email",
|
||||
@"username":@"username",
|
||||
@"publicProfile":@"public_profile",
|
||||
@"loginCount":@"login_count",
|
||||
@"createdAt":@"created_at",
|
||||
@"facebookId":@"facebookId",
|
||||
@"facebookAccessToken":@"facebookAccessToken",
|
||||
@"address":@{@"key":@"address",@"type":@"PNAddress"}
|
||||
};
|
||||
return mapping;
|
||||
}
|
||||
|
||||
+ (NSString *)objectClassName {
|
||||
return @"User";
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// User.h
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 08/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import <PNObject/PNObject.h>
|
||||
|
||||
@interface User : PNObject
|
||||
|
||||
@end
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// User.m
|
||||
// Pods
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 08/01/16.
|
||||
//
|
||||
//
|
||||
|
||||
#import "User.h"
|
||||
|
||||
@implementation User
|
||||
|
||||
- (instancetype) initWithJSON:(NSDictionary *)JSON {
|
||||
|
||||
self = [super initWithJSON:JSON];
|
||||
if (self) {
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user