1 | <?php |
||
7 | class JobFlight |
||
8 | { |
||
9 | /** |
||
10 | * @string |
||
11 | */ |
||
12 | private const RESULT_ACKNOWLEDGED = 'acknowledged'; |
||
13 | |||
14 | /** |
||
15 | * @string |
||
16 | */ |
||
17 | private const RESULT_ABANDONED = 'abandoned'; |
||
18 | |||
19 | /** |
||
20 | * @string |
||
21 | */ |
||
22 | private const RESULT_REQUEUED = 'requeued'; |
||
23 | |||
24 | /** |
||
25 | * @string |
||
26 | */ |
||
27 | private const RESULT_REJECTED = 'rejected'; |
||
28 | |||
29 | /** |
||
30 | * @string |
||
31 | */ |
||
32 | private const RESULT_LET_GO = 'let_go'; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | private $id; |
||
38 | |||
39 | /** |
||
40 | * @var int |
||
41 | */ |
||
42 | private $jobId; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | private $jobName; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | private $queue; |
||
53 | |||
54 | /** |
||
55 | * @var DateTimeImmutable |
||
56 | */ |
||
57 | private $departure; |
||
58 | |||
59 | /** |
||
60 | * @var null|DateTimeImmutable |
||
61 | */ |
||
62 | private $arrival; |
||
63 | |||
64 | /** |
||
65 | * @var string|string |
||
66 | */ |
||
67 | private $result; |
||
68 | |||
69 | /** |
||
70 | * @param int $jobId |
||
71 | * @param string $jobName |
||
72 | * @param string $queue |
||
73 | * @throws \Exception |
||
74 | */ |
||
75 | public function __construct(int $jobId, string $jobName, string $queue) |
||
84 | |||
85 | /** |
||
86 | * @return int |
||
87 | */ |
||
88 | public function jobId(): int |
||
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | public function jobName(): string |
||
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | public function queue(): string |
||
108 | |||
109 | /** |
||
110 | * @return void |
||
111 | */ |
||
112 | public function acknowledge(): void |
||
117 | |||
118 | /** |
||
119 | * @return void |
||
120 | */ |
||
121 | public function abandoned(): void |
||
126 | |||
127 | /** |
||
128 | * @return void |
||
129 | */ |
||
130 | public function requeued(): void |
||
135 | |||
136 | /** |
||
137 | * @throws void |
||
138 | */ |
||
139 | public function rejected(): void |
||
144 | |||
145 | /** |
||
146 | * @return void |
||
147 | */ |
||
148 | public function letGo(): void |
||
153 | } |
||
154 |