Completed
Push — master ( ead158...0c77a2 )
by Siim
12:04
created

TimestampableTrait::getDeletedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: siim
5
 * Date: 21.01.19
6
 * Time: 8:43
7
 */
8
9
namespace Sf4\Api\Entity\Traits;
10
11
trait TimestampableTrait
12
{
13
14
    /**
15
     * @ORM\Column(type="datetime", nullable=true)
16
     */
17
    private $created_at;
18
19
    /**
20
     * @ORM\ManyToOne(targetEntity="App\Entity\User")
21
     */
22
    private $created_by;
23
24
    /**
25
     * @ORM\Column(type="datetime", nullable=true)
26
     */
27
    private $updated_at;
28
29
    /**
30
     * @ORM\ManyToOne(targetEntity="App\Entity\User")
31
     */
32
    private $updated_by;
33
34
    /**
35
     * @ORM\Column(type="datetime", nullable=true)
36
     */
37
    private $deleted_at;
38
39
    /**
40
     * @ORM\ManyToOne(targetEntity="App\Entity\User")
41
     */
42
    private $deleted_by;
43
44
    public function getCreatedAt(): ?\DateTimeInterface
45
    {
46
        return $this->created_at;
47
    }
48
49
    public function setCreatedAt(?\DateTimeInterface $created_at): self
50
    {
51
        $this->created_at = $created_at;
52
53
        return $this;
54
    }
55
56
    public function getCreatedBy(): ?self
57
    {
58
        return $this->created_by;
59
    }
60
61
    public function setCreatedBy(?self $created_by): self
62
    {
63
        $this->created_by = $created_by;
64
65
        return $this;
66
    }
67
68
    public function getUpdatedAt(): ?\DateTimeInterface
69
    {
70
        return $this->updated_at;
71
    }
72
73
    public function setUpdatedAt(?\DateTimeInterface $updated_at): self
74
    {
75
        $this->updated_at = $updated_at;
76
77
        return $this;
78
    }
79
80
    public function getUpdatedBy(): ?self
81
    {
82
        return $this->updated_by;
83
    }
84
85
    public function setUpdatedBy(?self $updated_by): self
86
    {
87
        $this->updated_by = $updated_by;
88
89
        return $this;
90
    }
91
92
    public function getDeletedAt(): ?\DateTimeInterface
93
    {
94
        return $this->deleted_at;
95
    }
96
97
    public function setDeletedAt(?\DateTimeInterface $deleted_at): self
98
    {
99
        $this->deleted_at = $deleted_at;
100
101
        return $this;
102
    }
103
104
    public function getDeletedBy(): ?self
105
    {
106
        return $this->deleted_by;
107
    }
108
109
    public function setDeletedBy(?self $deleted_by): self
110
    {
111
        $this->deleted_by = $deleted_by;
112
113
        return $this;
114
    }
115
116
}
117