-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTask.h
55 lines (36 loc) · 1.08 KB
/
Task.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
#pragma once
#include "TimedPost.h"
#include <vector>
#include <set>
class Task {
private:
size_t Id;
std::string name;
std::string description;
int employeeId;
enum class Status {
Open,
Active,
Resolved
} status = Status::Open;
time_t creationTime;
std::vector<TimedPost *> comments;
std::vector<TimedPost *> history;
std::set<size_t> editorsId;
std::string statusString();
public:
Task(size_t _Id, std::string _name, std::string _description, int _employeeId, size_t creatorId);
void addComment(std::string text, size_t editorId);
void assignEmployee(int newEmployeeId, size_t editorId);
void changeStatus(int newStatus, size_t editorId);
size_t getId();
const std::string &getName();
const std::string &getDescription();
int getEmployeeId();
std::string getStatus();
time_t getCreationTime();
time_t getLastChangeTime();
const std::vector<TimedPost *> &getComments();
const std::vector<TimedPost *> &getHistory();
const std::set<size_t> &getEditorsId();
};