Passed
Push — master ( 492dcf...32ce96 )
by Julito
09:05
created

ResourceFile::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
nc 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Entity\Resource;
5
6
use Chamilo\CoreBundle\Entity\Tool;
7
use Chamilo\UserBundle\Entity\User;
8
use Doctrine\Common\Collections\ArrayCollection;
9
use Doctrine\ORM\Mapping as ORM;
10
use Gedmo\Mapping\Annotation as Gedmo;
11
use Symfony\Component\Validator\Constraints as Assert;
12
13
/**
14
 * @ORM\Entity
15
 * @ORM\Table(name="resource_file")
16
 */
17
class ResourceFile
18
{
19
    /**
20
     * @ORM\Id
21
     * @ORM\Column(type="integer")
22
     * @ORM\GeneratedValue
23
     */
24
    protected $id;
25
26
    /**
27
     * @ORM\Column()
28
     * @Assert\NotBlank()
29
     */
30
    protected $name;
31
32
    /**
33
     * @var string
34
     *
35
     * @Assert\NotBlank()
36
     *
37
     * @ORM\Column(name="hash", type="string", nullable=false)
38
     */
39
    protected $hash;
40
41
    /**
42
     * @Assert\NotBlank()
43
     * @var string
44
     *
45
     * @ORM\Column(name="original_filename", type="string", nullable=false)
46
     */
47
    protected $originalFilename;
48
49
    /**
50
     * @Assert\NotBlank()
51
     * @var string
52
     *
53
     * @ORM\Column(name="size", type="string", nullable=false)
54
     */
55
    protected $size;
56
57
    /**
58
     * @Assert\NotBlank()
59
     * @var string
60
     *
61
     * @ORM\Column(name="width", type="string", nullable=true)
62
     */
63
    protected $width;
64
65
    /**
66
     * @Assert\NotBlank()
67
     * @var string
68
     *
69
     * @ORM\Column(name="height", type="string", nullable=true)
70
     */
71
    protected $height;
72
73
    /**
74
     * @var string
75
     *
76
     * @ORM\Column(name="copyright", type="string", nullable=true)
77
     */
78
    protected $copyright;
79
80
    /**
81
     * @var string
82
     *
83
     * @ORM\Column(name="contentType", type="string", nullable=true)
84
     */
85
    protected $contentType;
86
87
    /**
88
     * @var string
89
     *
90
     * @ORM\Column(name="extension", type="string", nullable=false)
91
     */
92
    protected $extension;
93
94
    /**
95
     * @var ResourceNode
96
     *
97
     * @ORM\OneToOne(targetEntity="Chamilo\CoreBundle\Entity\Resource\ResourceNode", mappedBy="resourceFile")
98
     */
99
    protected $resourceNode;
100
101
    /**
102
     * @var string
103
     *
104
     * @ORM\Column(name="enabled", type="boolean")
105
     */
106
    protected $enabled;
107
108
    /**
109
     * @ORM\Column(name="created_at", type="datetime")
110
     * @Gedmo\Timestampable(on="create")
111
     */
112
    protected $createdAt;
113
114
    /**
115
     * @ORM\Column(name="updated_at", type="datetime")
116
     * @Gedmo\Timestampable(on="update")
117
     */
118
    protected $updatedAt;
119
120
    /**
121
     * Constructor.
122
     */
123
    public function __construct()
124
    {
125
    }
126
}
127