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
//
// ICRTask.m
// XFFruit
//
// 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