Passed
Push — master ( 661b0b...708b46 )
by Julito
09:18
created

Career::setDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\Entity;
8
9
use Doctrine\ORM\Mapping as ORM;
10
use Gedmo\Timestampable\Traits\TimestampableEntity;
11
use Symfony\Component\Validator\Constraints as Assert;
12
13
/**
14
 * Career.
15
 *
16
 * @ORM\Table(name="career")
17
 * @ORM\Entity
18
 */
19
class Career
20
{
21
    use TimestampableEntity;
22
23
    public const CAREER_STATUS_ACTIVE = 1;
24
    public const CAREER_STATUS_INACTIVE = 0;
25
26
    /**
27
     * @ORM\Column(name="id", type="integer")
28
     * @ORM\Id
29
     * @ORM\GeneratedValue()
30
     */
31
    protected int $id;
32
33
    /**
34
     * @Assert\NotBlank()
35
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
36
     */
37
    protected string $name;
38
39
    /**
40
     * @ORM\Column(name="description", type="text", nullable=false)
41
     */
42
    protected ?string $description;
43
44
    /**
45
     * @ORM\Column(name="status", type="integer", nullable=false)
46
     */
47
    protected int $status;
48
49
    public function __construct()
50
    {
51
        $this->status = self::CAREER_STATUS_ACTIVE;
52
    }
53
54
    /**
55
     * Get id.
56
     *
57
     * @return int
58
     */
59
    public function getId()
60
    {
61
        return $this->id;
62
    }
63
64
    /**
65
     * Set name.
66
     *
67
     * @param string $name
68
     *
69
     * @return Career
70
     */
71
    public function setName($name)
72
    {
73
        $this->name = $name;
74
75
        return $this;
76
    }
77
78
    /**
79
     * Get name.
80
     *
81
     * @return string
82
     */
83
    public function getName()
84
    {
85
        return $this->name;
86
    }
87
88
    /**
89
     * Set description.
90
     *
91
     * @param string $description
92
     *
93
     * @return Career
94
     */
95
    public function setDescription($description)
96
    {
97
        $this->description = $description;
98
99
        return $this;
100
    }
101
102
    /**
103
     * Get description.
104
     *
105
     * @return string
106
     */
107
    public function getDescription()
108
    {
109
        return $this->description;
110
    }
111
112
    /**
113
     * Set status.
114
     *
115
     * @param int $status
116
     *
117
     * @return Career
118
     */
119
    public function setStatus($status)
120
    {
121
        $this->status = $status;
122
123
        return $this;
124
    }
125
126
    /**
127
     * Get status.
128
     *
129
     * @return int
130
     */
131
    public function getStatus()
132
    {
133
        return $this->status;
134
    }
135
}
136