-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathAbstractEntity.php
More file actions
52 lines (39 loc) · 1.13 KB
/
AbstractEntity.php
File metadata and controls
52 lines (39 loc) · 1.13 KB
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
<?php
declare(strict_types=1);
namespace Shapecode\Bundle\CronBundle\Entity;
use DateTimeInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
abstract class AbstractEntity
{
#[ORM\Column(type: Types::INTEGER, options: ['unsigned' => true])]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected int|null $id = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
protected DateTimeInterface|null $createdAt = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
protected DateTimeInterface|null $updatedAt = null;
public function getId(): int|null
{
return $this->id;
}
public function setCreatedAt(DateTimeInterface $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getCreatedAt(): DateTimeInterface|null
{
return $this->createdAt;
}
public function setUpdatedAt(DateTimeInterface $updatedAt): static
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getUpdatedAt(): DateTimeInterface|null
{
return $this->updatedAt;
}
}