-
Notifications
You must be signed in to change notification settings - Fork 0
/
Objet.php
85 lines (74 loc) · 1.65 KB
/
Objet.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
namespace ResponsabilitesBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Objets de l'inventaire.
*
* @ORM\Table(name="objet")
* @ORM\Entity(repositoryClass="ResponsabilitesBundle\Repository\ObjetRepository")
*/
class Objet
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @Assert\Length(max=255, maxMessage="responsabilites.objet.nom.length.max")
* @Assert\NotBlank(message="responsabilites.objet.nom.not_blank")
* @Assert\Type(type="string", message="responsabilites.objet.nom.string")
*/
private $nom;
/**
* @ORM\ManyToOne(targetEntity="ResponsabilitesBundle\Entity\TypeObjet", inversedBy="objets")
* @ORM\JoinColumn(nullable=false)
*/
private $type;
/**
* @ORM\Column(type="text")
* @Assert\Type(type="string", message="responsabilites.objet.caracteristiques.string")
*/
private $caracteristiques;
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
return $this;
}
public function getNom()
{
return $this->nom;
}
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
public function getType()
{
return $this->type;
}
public function setType($type)
{
$type->addObjet($this);
$this->type = $type;
return $this;
}
public function getCaracteristiques()
{
return $this->caracteristiques;
}
public function setCaracteristiques($caracteristiques)
{
$this->caracteristiques = $caracteristiques;
return $this;
}
}