Passed
Push — master ( 784f8c...891151 )
by Julito
11:16
created

CStudentPublicationAssignment::getIid()   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
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CourseBundle\Entity;
8
9
use DateTime;
10
use Doctrine\ORM\Mapping as ORM;
11
12
/**
13
 * CStudentPublicationAssignment.
14
 *
15
 * @ORM\Table(
16
 *     name="c_student_publication_assignment",
17
 *     indexes={
18
 *     }
19
 * )
20
 * @ORM\Entity
21
 */
22
class CStudentPublicationAssignment
23
{
24
    /**
25
     * @ORM\Column(name="iid", type="integer")
26
     * @ORM\Id
27
     * @ORM\GeneratedValue
28
     */
29
    protected int $iid;
30
31
    /**
32
     * @ORM\Column(name="expires_on", type="datetime", nullable=true)
33
     */
34
    protected ?DateTime $expiresOn = null;
35
36
    /**
37
     * @ORM\Column(name="ends_on", type="datetime", nullable=true)
38
     */
39
    protected ?DateTime $endsOn = null;
40
41
    /**
42
     * @ORM\Column(name="add_to_calendar", type="integer", nullable=false)
43
     */
44
    protected int $addToCalendar;
45
46
    /**
47
     * @ORM\Column(name="enable_qualification", type="boolean", nullable=false)
48
     */
49
    protected bool $enableQualification;
50
51
    /**
52
     * @ORM\OneToOne(targetEntity="CStudentPublication", inversedBy="assignment")
53
     * @ORM\JoinColumn(name="publication_id", referencedColumnName="iid", onDelete="CASCADE")
54
     */
55
    protected CStudentPublication $publication;
56
57
    public function __toString(): string
58
    {
59
        return (string) $this->getIid();
60
    }
61
62
    public function getIid(): int
63
    {
64
        return $this->iid;
65
    }
66
67
    public function setExpiresOn(DateTime $expiresOn): self
68
    {
69
        $this->expiresOn = $expiresOn;
70
71
        return $this;
72
    }
73
74
    public function getExpiresOn(): ?DateTime
75
    {
76
        return $this->expiresOn;
77
    }
78
79
    public function setEndsOn(DateTime $endsOn): self
80
    {
81
        $this->endsOn = $endsOn;
82
83
        return $this;
84
    }
85
86
    public function getEndsOn(): ?DateTime
87
    {
88
        return $this->endsOn;
89
    }
90
91
    public function setAddToCalendar(int $addToCalendar): self
92
    {
93
        $this->addToCalendar = $addToCalendar;
94
95
        return $this;
96
    }
97
98
    public function getAddToCalendar(): int
99
    {
100
        return $this->addToCalendar;
101
    }
102
103
    public function setEnableQualification(bool $enableQualification): self
104
    {
105
        $this->enableQualification = $enableQualification;
106
107
        return $this;
108
    }
109
110
    public function getEnableQualification(): bool
111
    {
112
        return $this->enableQualification;
113
    }
114
115
    public function getPublication(): CStudentPublication
116
    {
117
        return $this->publication;
118
    }
119
120
    public function setPublication(CStudentPublication $publication): self
121
    {
122
        $this->publication = $publication;
123
124
        return $this;
125
    }
126
127
    /*
128
    public function getResourceIdentifier(): int
129
    {
130
        return $this->getIid();
131
    }
132
133
    public function getResourceName(): string
134
    {
135
        return (string) $this->getIid();
136
    }
137
138
    public function setResourceName(string $name): self
139
    {
140
        //return $this->setTitle($name);
141
    }*/
142
}
143