Completed
Pull Request — dev (#18)
by
unknown
05:20
created

FormRequest::getDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
7
use Symfony\Component\Validator\Constraints as Assert;
8
9
/**
10
 * Request.
11
 *
12
 * @ORM\Table(name="request")
13
 * @ORM\Entity(repositoryClass="AppBundle\Repository\FormRequestRepository")
14
 */
15
class FormRequest
16
{
17
    use ORMBehaviors\Timestampable\Timestampable;
18
19
    /**
20
     * @var int
21
     *
22
     * @ORM\Column(name="id", type="integer")
23
     * @ORM\Id
24
     * @ORM\GeneratedValue(strategy="AUTO")
25
     */
26
    private $id;
27
28
    /**
29
     * @var FormRequestType
30
     * @Assert\Type("object")
31
     * @Assert\Valid
32
     * @ORM\ManyToOne(targetEntity="FormRequestType", inversedBy="requests")
33
     */
34
    private $type;
35
36
    /**
37
     * @var string
38
     * @Assert\NotBlank()
39
     * @Assert\Type("string")
40
     * @Assert\Length(
41
     *      max = 255
42
     * )
43
     * @ORM\Column(type="string", length=255)
44
     */
45
    private $status;
46
47
    /**
48
     * @var User
49
     * @Assert\Type("object")
50
     * @Assert\Valid
51
     * @ORM\ManyToOne(targetEntity="User", inversedBy="formRequests")
52
     */
53
    private $user;
54
55
    /**
56
     * @var \DateTime
57
     * @Assert\Date()
58
     * @ORM\Column(type="datetime")
59
     */
60
    private $date;
61
62
    /**
63
     * Get id.
64
     *
65
     * @return int
66
     */
67
    public function getId()
68
    {
69
        return $this->id;
70
    }
71
72
    /**
73
     * Set type.
74
     *
75
     * @param FormRequestType $type
76
     *
77
     * @return FormRequest
78
     */
79
    public function setType(FormRequestType $type)
80
    {
81
        $this->type = $type;
82
83
        return $this;
84
    }
85
86
    /**
87
     * Get type.
88
     *
89
     * @return FormRequestType
90
     */
91
    public function getType()
92
    {
93
        return $this->type;
94
    }
95
96
    /**
97
     * Set status.
98
     *
99
     * @param string $status
100
     *
101
     * @return FormRequest
102
     */
103
    public function setStatus($status)
104
    {
105
        $this->status = $status;
106
107
        return $this;
108
    }
109
110
    /**
111
     * Get status.
112
     *
113
     * @return string
114
     */
115
    public function getStatus()
116
    {
117
        return $this->status;
118
    }
119
120
    /**
121
     * Set user.
122
     *
123
     * @param User $user
124
     *
125
     * @return FormRequest
126
     */
127
    public function setUser(User $user)
128
    {
129
        $this->user = $user;
130
131
        return $this;
132
    }
133
134
    /**
135
     * Get user.
136
     *
137
     * @return User
138
     */
139
    public function getUser()
140
    {
141
        return $this->user;
142
    }
143
144
    /**
145
     * Set date.
146
     *
147
     * @param \DateTime $date
148
     *
149
     * @return FormRequest
150
     */
151
    public function setDate($date)
152
    {
153
        $this->date = $date;
154
155
        return $this;
156
    }
157
    /**
158
     * Get date.
159
     *
160
     * @return \DateTime
161
     */
162
    public function getDate()
163
    {
164
        return $this->date;
165
    }
166
}
167