Completed
Pull Request — master (#30)
by
unknown
05:03
created

FormRequest::getDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
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\Serializer\Annotation\Groups;
8
use Symfony\Component\Validator\Constraints as Assert;
9
10
/**
11
 * FormRequest.
12
 *
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
     * @Groups({"Detail"})
34
     */
35
    private $type;
36
37
    /**
38
     * @var string
39
     * @Assert\NotBlank()
40
     * @Assert\Type("string")
41
     * @Assert\Length(
42
     *      max = 255
43
     * )
44
     * @ORM\Column(type="string", length=255)
45
     * @Groups({"Detail"})
46
     */
47
    private $status;
48
49
    /**
50
     * @var User
51
     * @Assert\Type("object")
52
     * @Assert\Valid
53
     * @ORM\ManyToOne(targetEntity="User", inversedBy="formRequests")
54
     */
55
    private $user;
56
57
    /**
58
     * @var \DateTime
59
     * @Assert\Date()
60
     * @ORM\Column(type="datetime")
61
     * @Groups({"Detail"})
62
     */
63
    private $date;
64
65
    /**
66
     * Get id.
67
     *
68
     * @return int
69
     */
70
    public function getId()
71
    {
72
        return $this->id;
73
    }
74
75
    /**
76
     * Set type.
77
     *
78
     * @param FormRequestType $type
79
     *
80
     * @return FormRequest
81
     */
82
    public function setType(FormRequestType $type)
83
    {
84
        $this->type = $type;
85
86
        return $this;
87
    }
88
89
    /**
90
     * Get type.
91
     *
92
     * @return FormRequestType
93
     */
94 1
    public function getType()
95
    {
96 1
        return $this->type;
97
    }
98
99
    /**
100
     * Set status.
101
     *
102
     * @param string $status
103
     *
104
     * @return FormRequest
105
     */
106
    public function setStatus($status)
107
    {
108
        $this->status = $status;
109
110
        return $this;
111
    }
112
113
    /**
114
     * Get status.
115
     *
116
     * @return string
117
     */
118 1
    public function getStatus()
119
    {
120 1
        return $this->status;
121
    }
122
123
    /**
124
     * Set user.
125
     *
126
     * @param User $user
127
     *
128
     * @return FormRequest
129
     */
130
    public function setUser(User $user)
131
    {
132
        $this->user = $user;
133
134
        return $this;
135
    }
136
137
    /**
138
     * Get user.
139
     *
140
     * @return User
141
     */
142
    public function getUser()
143
    {
144
        return $this->user;
145
    }
146
147
    /**
148
     * Set date.
149
     *
150
     * @param \DateTime $date
151
     *
152
     * @return FormRequest
153
     */
154
    public function setDate($date)
155
    {
156
        $this->date = $date;
157
158
        return $this;
159
    }
160
    /**
161
     * Get date.
162
     *
163
     * @return \DateTime
164
     */
165 1
    public function getDate()
166
    {
167 1
        return $this->date;
168
    }
169
}
170