-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimeEntry.h
60 lines (47 loc) · 1.46 KB
/
TimeEntry.h
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
47
48
49
50
51
52
53
54
55
56
57
//
// TimeEntry.h
// TimeClock
//
// Created by Matthew Baker on 10/8/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import <CoreData/CoreData.h>
typedef enum {
TimeEntryStateNewEntry,
TimeEntryStateShiftBegun,
TimeEntryStateShiftEnded,
TimeEntryStateBreakBegun,
TimeEntryStateBreakEnded
} TimeEntryState;
typedef enum {
TimeEntryPunchTypeNewEntry,
TimeEntryPunchTypeBeginDay,
TimeEntryPunchTypeEndDay,
TImeEntryPunchTypeBeginBreak,
TimeEntryPunchTypeEndBreak,
TimeEntryPunchTypeBeginOvertime,
TimeEntryPunchTypeEndOvertime
} TimeEntryPunchType;
@class Break, Client;
@interface TimeEntry : NSManagedObject
{
}
- (NSNumber *)totalTime;
//forIsExplicitOvertime makes this entry time and a half from beginning to end
//overtime resulting from more than 40 hours in a week is calculated someplace else
- (void)punchDay;
- (void)punchBreak:(NSManagedObjectContext *)managedObjectContext;
@property (nonatomic, retain) NSString * notes;
@property (nonatomic, retain) NSDate * outTime;
@property (nonatomic, retain) NSDate * inTime;
@property (nonatomic, retain) Client * client;
@property (nonatomic, retain) NSSet *breaks;
@property (nonatomic, retain) NSNumber * isOvertime;
@property (nonatomic, readonly) TimeEntryState currentState;
@end
@interface TimeEntry (CoreDataGeneratedAccessors)
- (void)addBreaksObject:(Break *)value;
- (void)removeBreaksObject:(Break *)value;
- (void)addBreaks:(NSSet *)value;
- (void)removeBreaks:(NSSet *)value;
@end