1 | <?php |
||
23 | trait TimestampableTrait |
||
24 | { |
||
25 | /** |
||
26 | * @var \DateTimeImmutable |
||
27 | * |
||
28 | * @Assert\Type("\DateTimeImmutable") |
||
29 | * |
||
30 | * @ORM\Column(type="datetime", nullable=false) |
||
31 | */ |
||
32 | protected $createdAt; |
||
33 | |||
34 | /** |
||
35 | * @var \DateTime |
||
36 | * |
||
37 | * @Assert\Type("\DateTime") |
||
38 | * |
||
39 | * @ORM\Column(type="datetime", nullable=false) |
||
40 | */ |
||
41 | protected $updatedAt; |
||
42 | |||
43 | /** |
||
44 | * @return \DateTimeImmutable|null |
||
45 | */ |
||
46 | public function getCreatedAt(): ?\DateTimeImmutable |
||
50 | |||
51 | /** |
||
52 | * @param \DateTimeImmutable $createdAt |
||
53 | * |
||
54 | * @return $this |
||
55 | */ |
||
56 | public function setCreatedAt(\DateTimeImmutable $createdAt) |
||
62 | |||
63 | /** |
||
64 | * @return \DateTime|null |
||
65 | */ |
||
66 | public function getUpdatedAt(): ?\DateTime |
||
70 | |||
71 | /** |
||
72 | * @param \DateTime $updatedAt |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | public function setUpdatedAt(\DateTime $updatedAt) |
||
82 | } |
||
83 |