|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace alekciy\ofd\providers\taxcom\Model; |
|
4
|
|
|
|
|
5
|
|
|
use alekciy\ofd\BaseModel; |
|
6
|
|
|
use alekciy\ofd\interfaces\ShiftInterface; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* Сокращенная информация по смене. |
|
10
|
|
|
*/ |
|
11
|
|
|
class ShiftShort extends BaseModel implements ShiftInterface |
|
12
|
|
|
{ |
|
13
|
|
|
/** @var string Заводской номер ФН */ |
|
14
|
|
|
public $fnFactoryNumber = ''; |
|
15
|
|
|
|
|
16
|
|
|
/** @var string Дата открытия */ |
|
17
|
|
|
public $openDateTime = ''; |
|
18
|
|
|
|
|
19
|
|
|
/** @var string Дата закрытия */ |
|
20
|
|
|
public $closeDateTime = ''; |
|
21
|
|
|
|
|
22
|
|
|
/** @var int Номер смены */ |
|
23
|
|
|
public $shiftNumber = 0; |
|
24
|
|
|
|
|
25
|
|
|
/** @var int Кол-во чеков за смену */ |
|
26
|
|
|
public $receiptCount = 0; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @inheritDoc |
|
30
|
|
|
*/ |
|
31
|
|
|
public function getRuleList(): array |
|
32
|
|
|
{ |
|
33
|
|
|
return [ |
|
34
|
|
|
'fnFactoryNumber' => ['required', ['lengthMin', 1], ['lengthMax', 16]], |
|
35
|
|
|
'openDateTime' => ['required', ['dateFormat', 'Y-m-d\TH:i:s']], |
|
36
|
|
|
'shiftNumber' => ['required', 'integer', ['min', 0]], |
|
37
|
|
|
'receiptCount' => ['required', 'integer', ['min', 0]], |
|
38
|
|
|
|
|
39
|
|
|
'closeDateTime' => [['dateFormat', 'Y-m-d\TH:i:s']], |
|
40
|
|
|
]; |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @inheritDoc |
|
45
|
|
|
*/ |
|
46
|
|
|
public function getFnFactoryNumber(): string |
|
47
|
|
|
{ |
|
48
|
|
|
return $this->fnFactoryNumber; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @inheritDoc |
|
53
|
|
|
*/ |
|
54
|
|
|
public function getShiftNumber(): int |
|
55
|
|
|
{ |
|
56
|
|
|
return $this->shiftNumber; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @inheritDoc |
|
61
|
|
|
*/ |
|
62
|
|
|
public function getOpenDateTime(): string |
|
63
|
|
|
{ |
|
64
|
|
|
return $this->openDateTime; |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* @inheritDoc |
|
69
|
|
|
*/ |
|
70
|
|
|
public function getCloseDateTime(): string |
|
71
|
|
|
{ |
|
72
|
|
|
return $this->closeDateTime; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* @inheritDoc |
|
77
|
|
|
*/ |
|
78
|
|
|
protected function getPropertyInitMap(): array |
|
79
|
|
|
{ |
|
80
|
|
|
return []; |
|
81
|
|
|
} |
|
82
|
|
|
} |