1: <?php
2: namespace TIC\DemoBundle\Entity;
3:
4: use TIC\DormBundle\Base\TICEntity as BaseEntity;
5: use TIC\DemoBundle\Repository\FormulaireRepository as EntityRepo;
6:
7: use Doctrine\ORM\Mapping as ORM;
8: use Symfony\Component\Validator\Constraints as Assert;
9:
10: /**
11: * @ORM\Table(name="tic_demo_formulaire")
12: * @ORM\Entity(repositoryClass=EntityRepo::class)
13: */
14: class Formulaire extends BaseEntity
15: {
16: /**
17: * @ORM\Id
18: * @ORM\GeneratedValue
19: * @ORM\Column(type="integer")
20: */
21: private $id;
22:
23: /**
24: * @ORM\Column(type="string", length=100)
25: */
26: private $name;
27:
28: /**
29: * @ORM\Column(type="json", nullable=true)
30: */
31: private $titles = [];
32:
33: /**
34: * @ORM\Column(type="text", nullable=true)
35: */
36: private $description;
37:
38: /**
39: * @ORM\Column(type="integer")
40: */
41: private $quantity;
42:
43: /**
44: * @ORM\Column(type="decimal", precision=8, scale=2, nullable=true)
45: */
46: private $tarif;
47:
48: /**
49: * @ORM\Column(type="smallint", nullable=true)
50: */
51: private $score;
52:
53: /**
54: * @ORM\Column(type="smallint")
55: */
56: private $etoile;
57:
58: /**
59: * @ORM\Column(type="date")
60: */
61: private $dateNaissance;
62:
63:
64: // --------------------------------------------------------------------- Custom methods
65:
66: public function __construct()
67: {
68: $this->quantity = 0;
69: $this->etoile = 0;
70: }
71:
72: public function __toString()
73: {
74: return $this->getName();
75: }
76:
77:
78: // --------------------------------------------------------------------- Shortcut methods
79:
80:
81: // --------------------------------------------------------------------- Tweaked methods
82:
83:
84: // --------------------------------------------------------------------- Auto-generated
85:
86: public function getId(): ?int
87: {
88: return $this->id;
89: }
90:
91: public function getName(): ?string
92: {
93: return $this->name;
94: }
95:
96: public function setName(string $name): self
97: {
98: $this->name = $name;
99:
100: return $this;
101: }
102:
103: public function getTitles(): ?array
104: {
105: return $this->titles;
106: }
107:
108: public function setTitles(?array $titles): self
109: {
110: $this->titles = $titles;
111:
112: return $this;
113: }
114:
115: public function getDescription(): ?string
116: {
117: return $this->description;
118: }
119:
120: public function setDescription(?string $description): self
121: {
122: $this->description = $description;
123:
124: return $this;
125: }
126:
127: public function getQuantity(): ?int
128: {
129: return $this->quantity;
130: }
131:
132: public function setQuantity(int $quantity): self
133: {
134: $this->quantity = $quantity;
135:
136: return $this;
137: }
138:
139: public function getTarif(): ?string
140: {
141: return $this->tarif;
142: }
143:
144: public function setTarif(?string $tarif): self
145: {
146: $this->tarif = $tarif;
147:
148: return $this;
149: }
150:
151: public function getScore(): ?int
152: {
153: return $this->score;
154: }
155:
156: public function setScore(?int $score): self
157: {
158: $this->score = $score;
159:
160: return $this;
161: }
162:
163: public function getEtoile(): ?int
164: {
165: return $this->etoile;
166: }
167:
168: public function setEtoile(int $etoile): self
169: {
170: $this->etoile = $etoile;
171:
172: return $this;
173: }
174:
175: public function getDateNaissance(): ?\DateTimeInterface
176: {
177: return $this->dateNaissance;
178: }
179:
180: public function setDateNaissance(\DateTimeInterface $dateNaissance): self
181: {
182: $this->dateNaissance = $dateNaissance;
183:
184: return $this;
185: }
186: }
187: