src/Entity/Core/Reservations.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core;
  3. use Doctrine\DBAL\Types\Types;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * Reservations
  9. *
  10. * @ORM\Table("core_reservations")
  11. * @ORM\Entity(repositoryClass="App\Repository\Core\ReservationsRepository")
  12. * @ORM\HasLifecycleCallbacks()
  13. */
  14. class Reservations
  15. {
  16. /**
  17. * @var integer
  18. *
  19. * @ORM\Column(name="id", type="integer")
  20. * @ORM\Id
  21. * @ORM\GeneratedValue(strategy="AUTO")
  22. */
  23. protected $id;
  24. /**
  25. * @var string
  26. *
  27. * @ORM\Column(name="created_at", type="datetime", nullable=true)
  28. */
  29. private $createdAt;
  30. /**
  31. * @var string
  32. *
  33. * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  34. */
  35. private $updatedAt;
  36. /**
  37. * @var string
  38. *
  39. * @ORM\Column(name="name", type="string", length=255, nullable=true)
  40. */
  41. private $name;
  42. /**
  43. * @var string
  44. *
  45. * @ORM\Column(name="lastname", type="string", length=255, nullable=true)
  46. */
  47. private $lastname;
  48. /**
  49. * @var string
  50. *
  51. * @ORM\Column(name="email", type="string", length=255, nullable=true)
  52. */
  53. private $email;
  54. /**
  55. * @var string
  56. *
  57. * @ORM\Column(name="pricing", type="float", length=11, nullable=true)
  58. */
  59. private $pricing;
  60. /**
  61. * @var int
  62. *
  63. * @ORM\Column(name="persons", type="integer", length=11, nullable=true)
  64. */
  65. private $persons;
  66. /**
  67. * @var int
  68. *
  69. * @ORM\Column(name="adults", type="integer", nullable=true, options={"default" : 2})
  70. */
  71. private $adults = 2;
  72. /**
  73. * @var int
  74. *
  75. * @ORM\Column(name="children", type="integer", nullable=true, options={"default" : 0})
  76. */
  77. private $children = 0;
  78. /**
  79. * @var int
  80. *
  81. * @ORM\Column(name="rooms", type="integer", nullable=true, options={"default" : 1})
  82. */
  83. private $rooms = 1;
  84. /**
  85. * @var string
  86. *
  87. * @ORM\Column(name="message", type="string", length=255, nullable=true)
  88. */
  89. private $message;
  90. /**
  91. * @ORM\Column(type="boolean", nullable=true)
  92. */
  93. private $parking;
  94. /**
  95. * @ORM\Column(type="boolean", nullable=true)
  96. */
  97. private $petitdej;
  98. /**
  99. * @ORM\Column(type="boolean", nullable=true)
  100. */
  101. private $menage;
  102. /**
  103. * @ORM\Column(type="boolean", nullable=true)
  104. */
  105. private $payed;
  106. /**
  107. * @var string
  108. *
  109. * @ORM\Column(name="start", type="date", nullable=true)
  110. */
  111. private $start;
  112. /**
  113. * @var string
  114. *
  115. * @ORM\Column(name="end", type="date", nullable=true)
  116. */
  117. private $end;
  118. /**
  119. * @var string
  120. *
  121. * @ORM\Column(name="locale", type="string", length=11, nullable=true)
  122. */
  123. private $locale;
  124. /**
  125. * @var string
  126. *
  127. * @ORM\Column(name="stripe_identifiant", type="string", length=255, nullable=true)
  128. */
  129. private $stripeIdentifiant;
  130. /**
  131. * @var string
  132. *
  133. * @ORM\Column(name="stripe_url", type="text", nullable=true)
  134. */
  135. private $stripeUrl;
  136. /**
  137. * @var string
  138. *
  139. * @ORM\Column(name="stripe_bill", type="text", nullable=true)
  140. */
  141. private $stripeBill;
  142. /**
  143. * @var string
  144. *
  145. * @ORM\Column(name="stripe_payed", type="boolean", nullable=true)
  146. */
  147. private $stripePayed;
  148. /**
  149. * @var string
  150. *
  151. * @ORM\Column(name="status", type="string", length=255, nullable=true)
  152. */
  153. private $status;
  154. /**
  155. * @ORM\PrePersist
  156. */
  157. public function setCreatedAtValue(): void
  158. {
  159. $this->setCreatedAt(new \DateTime("now"));
  160. $this->setUpdatedAt(new \DateTime("now"));
  161. $this->setLocale("en");
  162. }
  163. /**
  164. * @ORM\PreUpdate
  165. */
  166. public function setUpdatedAtValue(): void
  167. {
  168. $this->setUpdatedAt(new \DateTime("now"));
  169. }
  170. public function __toString() {
  171. return $this->name;
  172. }
  173. public function getId(): ?int
  174. {
  175. return $this->id;
  176. }
  177. public function getCreatedAt(): ?\DateTimeInterface
  178. {
  179. return $this->createdAt;
  180. }
  181. public function setCreatedAt(?\DateTimeInterface $createdAt): static
  182. {
  183. $this->createdAt = $createdAt;
  184. return $this;
  185. }
  186. public function getUpdatedAt(): ?\DateTimeInterface
  187. {
  188. return $this->updatedAt;
  189. }
  190. public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
  191. {
  192. $this->updatedAt = $updatedAt;
  193. return $this;
  194. }
  195. public function getName(): ?string
  196. {
  197. return $this->name;
  198. }
  199. public function setName(?string $name): static
  200. {
  201. $this->name = $name;
  202. return $this;
  203. }
  204. public function getLastname(): ?string
  205. {
  206. return $this->lastname;
  207. }
  208. public function setLastname(?string $lastname): static
  209. {
  210. $this->lastname = $lastname;
  211. return $this;
  212. }
  213. public function getEmail(): ?string
  214. {
  215. return $this->email;
  216. }
  217. public function setEmail(?string $email): static
  218. {
  219. $this->email = $email;
  220. return $this;
  221. }
  222. public function getPricing(): ?float
  223. {
  224. return $this->pricing;
  225. }
  226. public function setPricing(?float $pricing): static
  227. {
  228. $this->pricing = $pricing;
  229. return $this;
  230. }
  231. public function getMessage(): ?string
  232. {
  233. return $this->message;
  234. }
  235. public function setMessage(?string $message): static
  236. {
  237. $this->message = $message;
  238. return $this;
  239. }
  240. public function isParking(): ?bool
  241. {
  242. return $this->parking;
  243. }
  244. public function setParking(?bool $parking): static
  245. {
  246. $this->parking = $parking;
  247. return $this;
  248. }
  249. public function isPetitdej(): ?bool
  250. {
  251. return $this->petitdej;
  252. }
  253. public function setPetitdej(?bool $petitdej): static
  254. {
  255. $this->petitdej = $petitdej;
  256. return $this;
  257. }
  258. public function isMenage(): ?bool
  259. {
  260. return $this->menage;
  261. }
  262. public function setMenage(?bool $menage): static
  263. {
  264. $this->menage = $menage;
  265. return $this;
  266. }
  267. public function isPayed(): ?bool
  268. {
  269. return $this->payed;
  270. }
  271. public function setPayed(?bool $payed): static
  272. {
  273. $this->payed = $payed;
  274. return $this;
  275. }
  276. public function getStart(): ?\DateTimeInterface
  277. {
  278. return $this->start;
  279. }
  280. public function setStart(?\DateTimeInterface $start): static
  281. {
  282. $this->start = $start;
  283. return $this;
  284. }
  285. public function getEnd(): ?\DateTimeInterface
  286. {
  287. return $this->end;
  288. }
  289. public function setEnd(?\DateTimeInterface $end): static
  290. {
  291. $this->end = $end;
  292. return $this;
  293. }
  294. public function getLocale(): ?string
  295. {
  296. return $this->locale;
  297. }
  298. public function setLocale(?string $locale): static
  299. {
  300. $this->locale = $locale;
  301. return $this;
  302. }
  303. public function getStripeIdentifiant(): ?string
  304. {
  305. return $this->stripeIdentifiant;
  306. }
  307. public function setStripeIdentifiant(?string $stripeIdentifiant): static
  308. {
  309. $this->stripeIdentifiant = $stripeIdentifiant;
  310. return $this;
  311. }
  312. public function getStripeUrl(): ?string
  313. {
  314. return $this->stripeUrl;
  315. }
  316. public function setStripeUrl(?string $stripeUrl): static
  317. {
  318. $this->stripeUrl = $stripeUrl;
  319. return $this;
  320. }
  321. public function isStripePayed(): ?bool
  322. {
  323. return $this->stripePayed;
  324. }
  325. public function setStripePayed(?bool $stripePayed): static
  326. {
  327. $this->stripePayed = $stripePayed;
  328. return $this;
  329. }
  330. public function getStatus(): ?string
  331. {
  332. return $this->status;
  333. }
  334. public function setStatus(?string $status): static
  335. {
  336. $this->status = $status;
  337. return $this;
  338. }
  339. public function getPersons(): ?int
  340. {
  341. return $this->persons;
  342. }
  343. public function setPersons(?int $persons): static
  344. {
  345. $this->persons = $persons;
  346. return $this;
  347. }
  348. public function getStripeBill(): ?string
  349. {
  350. return $this->stripeBill;
  351. }
  352. public function setStripeBill(?string $stripeBill): static
  353. {
  354. $this->stripeBill = $stripeBill;
  355. return $this;
  356. }
  357. public function getAdults(): ?int
  358. {
  359. return $this->adults;
  360. }
  361. public function setAdults(?int $adults): static
  362. {
  363. $this->adults = $adults;
  364. return $this;
  365. }
  366. public function getChildren(): ?int
  367. {
  368. return $this->children;
  369. }
  370. public function setChildren(?int $children): static
  371. {
  372. $this->children = $children;
  373. return $this;
  374. }
  375. public function getRooms(): ?int
  376. {
  377. return $this->rooms;
  378. }
  379. public function setRooms(?int $rooms): static
  380. {
  381. $this->rooms = $rooms;
  382. return $this;
  383. }
  384. }