1 | <?php |
||
25 | class Task implements EntityInterface |
||
26 | { |
||
27 | use Traits\PropertyIdGeneratedTrait; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | * @ORM\Column(name="type", type="string", length=50, nullable=false) |
||
32 | * |
||
33 | * @Assert\NotBlank() |
||
34 | * @Assert\Choice(callback={"App\Enum\Entity\TaskTypeEnum", "toArray"}) |
||
35 | * @Assert\Length(min="1", max="50") |
||
36 | */ |
||
37 | private $type; |
||
38 | |||
39 | //------------------------------------------------------------------------------------------- |
||
40 | /** |
||
41 | * @var ArrayCollection|Journal[] |
||
42 | * @ORM\OneToMany(targetEntity="App\Entity\Accounting\Journal", mappedBy="task") |
||
43 | */ |
||
44 | private $journals; |
||
45 | |||
46 | //------------------------------------------------------------------------------------------- |
||
47 | |||
48 | public function __construct(TaskTypeEnum $type) |
||
54 | |||
55 | //------------------------------------------------------------------------------------------- |
||
56 | |||
57 | public function getType(): TaskTypeEnum |
||
61 | |||
62 | /** |
||
63 | * @return Journal[]|ArrayCollection |
||
64 | */ |
||
65 | public function getJournals(): ArrayCollection |
||
69 | } |
||
70 |