//
//  JDJSONModel.h
//  kneet
//
//  Created by Jason Lee on 2/9/15.
//  Copyright (c) 2015 ntels. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

#import "JDJSONModel.h"

@protocol HomeGroupModel;
@interface HomeGroupModel : JDJSONModel
@property (nonatomic, copy) NSString *homegrpId;
@property (nonatomic, copy) NSString *homegrpName;
@property (nonatomic, copy) NSString *locationCoordinate;
@property (nonatomic, copy) NSString *locationRadius;
@property (nonatomic, copy) NSString *deviceId;
@property (nonatomic, copy) NSString *deviceKey;
@property (nonatomic, copy) NSString *deviceAuthorization;
@property (nonatomic, copy) NSString *locationAddr;
@property (nonatomic, copy) NSString *imageFileName;
@property (nonatomic, copy) NSString *gradeCode;

//util
@property (nonatomic, assign) NSInteger level;
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;

@end

@interface HomeGroupListModel : JDJSONModel

@property (nonatomic, strong) NSMutableArray<HomeGroupModel> *homegrpList;

@end

@protocol InvitationModel;
@interface InvitationModel : JDJSONModel

@property (nonatomic, copy) NSString *homegrpId;
@property (nonatomic, copy) NSString *homegrpName;
@property (nonatomic, copy) NSString *nickname;
@property (nonatomic, copy) NSString *authorizationQuestion;
@property (nonatomic, copy) NSString *targetEmail;
@property (nonatomic, copy) NSString *imageFileName;

//temp
@property (nonatomic, copy) NSString *sdate;

@end

@protocol HomeMemberModel;
@interface HomeMemberModel : JDJSONModel

@property (nonatomic, copy) NSString *invitation;
@property (nonatomic, copy) NSString *nickname;
@property (nonatomic, copy) NSString *gradeCode;
@property (nonatomic, copy) NSString *gradeCodeName;
@property (nonatomic, copy) NSString *targetEmail;
@property (nonatomic, copy) NSString *imageFileName;

@end

@interface HomeMemberListModel : JDJSONModel

@property (nonatomic, copy) NSArray<HomeMemberModel> *homegrpMemberList;

@end

@protocol MemberIconModel;
@interface MemberIconModel : JDJSONModel

@property (copy, nonatomic) NSString *imageFileName;
@property (copy, nonatomic) NSString *imageFilePath;

@end

@interface MemberIconListModel : JDJSONModel

@property (copy, nonatomic) NSArray<MemberIconModel> *iconList;

@end

@interface MobileDeviceListModel : JDJSONModel

@property (strong, nonatomic) NSMutableArray<MobileDeviceModel> *deviceList;

@end

@interface LoginModel : JDJSONModel

//회원 번호
//이메일 ID
//서비스 ID
//국가 코드 (ex: KR)
//타임존 ID
//타임존 시간 (ex: +09:00)
//언어 코드 (ex: en)
//인증 토큰
//회원 여부
//회원 이미지
//회원 닉네임
@property (nonatomic, copy) NSString *memberId;
@property (nonatomic, copy) NSString *emailId;
@property (nonatomic, copy) NSString *serviceId;
@property (nonatomic, copy) NSString *countryCode;
@property (nonatomic, copy) NSString *timezoneId;
@property (nonatomic, copy) NSString *timezone;
@property (nonatomic, copy) NSString *lang;
@property (nonatomic, copy) NSString *authToken;
@property (nonatomic, copy) NSString *member;
@property (nonatomic, copy) NSString *imageFileName;
@property (nonatomic, copy) NSString *nickname;
@property (nonatomic, copy) NSString *key;
@property (nonatomic, copy) NSString *tempPasswordYn;
@property (nonatomic, copy) NSString *pushTypeModeChgYn;
@property (nonatomic, copy) NSString *pushTypeRuleExcYn;


@property (nonatomic, strong) NSMutableArray<HomeGroupModel> *homegrpList;
@property (nonatomic, strong) NSMutableArray<InvitationModel> *invitationList;


//local store
@property (strong, nonatomic) NSMutableDictionary *localStorage;

@property (nonatomic, strong) NSString *homegrpId;  //로컬에 저장
@property (strong, nonatomic) NSString *newEmailId; //로컬에 저장 - 임시 이메일
@property (strong, nonatomic) NSString *modeChange; //로컬에 저장 - 모드 최초 실행 여부


//디바이스
@property (strong, nonatomic) NSString *mobileDeviceId; //FIXME : delete
@property (strong, nonatomic) NSString *mobileDeviceAuthorization;
@property (strong, nonatomic) NSString *hasRegisterMobileDevice;


- (void)addHomegrp:(HomeGroupModel *)homegrp;

//지오펜스 정보
//@property (strong, nonatomic) NSMutableArray *mobileDeviceGeoFenceSensors;    //Dictionary - 타이틀, 주소, 위도, 경도, 반경, 실행 여부, 체크인?
//- (void)saveMobileDeviceGeoFenceSensors;

@end

