//
//  ICRTask.m
//  Cruiser
//
//  Created by Xummer on 4/10/15.
//  Copyright (c) 2015 Xummer. All rights reserved.
//

#import "ICRTask.h"
#import "ICRPostTask.h"

@implementation ICRTask

+ (NSDictionary *)specialKeysAndReplaceKeys {
    return @{ @"tID" : [[self class] PrimaryKey], };
}

+ (NSString *)PrimaryKey {
    return @"uuid";
}

+ (NSArray *)localKeys {
    return @[ @"localStatus" ];
}

#pragma mark - Public Method
+ (ICRTask *)taskFromPostTask:(ICRPostTask *)postTask {
    ICRTask *taskE = [[ICRTask alloc] init];
    taskE.title = postTask.title;
    taskE.content = postTask.content;
    taskE.requireDate = postTask.requireDate;
    taskE.uuid = postTask.uuid;
//    taskE.relatedStore = postTask.relatedStore;
//    taskE.assignToMe = postTask.assignToMe;
//    taskE.status = postTask.assignToMe ? kICRTaskStatusAlloted : kICRTaskStatusNew;
//    taskE.state = postTask.state;
//    taskE.mobileId = postTask.mobileId;
//    taskE.photo = postTask.photo;
    taskE.isNotUploaded = postTask.isNotUploaded;
    
    return taskE;
}

@end
