-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwork.h
67 lines (59 loc) · 1.81 KB
/
work.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
58
59
60
61
62
63
64
65
66
67
//
// work.h
// 腾飞科创Model
//
// Created by leavesyoung on 2018/5/2.
// Copyright © 2018年 leavesyoung. All rights reserved.
//
#ifndef work_h
#define work_h
typedef enum WorkingStatus
{
Waiting,//the work is being worked by the previous guy;
NeedCheck,//the previous guy has handed in, you need to check his work
UnderWorking,//you are working with it
HandedIn,//you have done your work and handed in, waiting to be checked by the next guy;
Checked,//your work is completed;
NeedToRework//work failed.need to fix your work;
}WorkingStatus;
class work{
public:
work(){}
work(int WorkID,int TypeID,int WorkFlowID);
~work();
//setters and getters
int GetWorkID();
int GetTypeID();
int GetWorkFlowID();
int GetPreWorkID();
int GetNextWorkID();
int GetWorkerID();
WorkingStatus getStatus();
void SetPreWorkID(int ID);
void SetNextWorkID(int ID);
void SetWorkerID(int ID);
void SetStatus(WorkingStatus status);
bool IsTaken();
void operator = (work u){
this->WorkID=u.WorkID;
this->TypeID=u.TypeID;
this->WorkFlowID=u.WorkFlowID;
this->PreWorkID=u.PreWorkID;
this->NextWorkID=u.NextWorkID;
this->Status=u.Status;
this->WorkerID=u.WorkerID;
}
bool operator < (work w){
return this->WorkID<w.GetWorkID();
}
private:
int WorkID; //the id of the work in the workflow
int TypeID; //the id of the work type
int WorkFlowID; //the id of the workflow
//default:chain work flow
int PreWorkID; //the id of the former work,-1 if it's the first work
int NextWorkID; //the id of the next work,-1 if it's the last work
int WorkerID;//the id of the worker to deal with it.-1 if no worker
WorkingStatus Status;
};
#endif /* work_h */