src/Entity/SettingsOffice.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * SettingsOffice
  6. */
  7. #[ORM\Entity(repositoryClass: \App\Repository\SettingsOfficeRepository::class)]
  8. #[ORM\Table(name: 'settings_office')]
  9. class SettingsOffice
  10. {
  11. /**
  12. * @var int
  13. */
  14. #[ORM\Column(name: 'id', type: 'integer')]
  15. #[ORM\Id]
  16. #[ORM\GeneratedValue(strategy: 'AUTO')]
  17. private $id;
  18. /**
  19. * @var string
  20. */
  21. #[ORM\Column(name: 'office', type: 'string', length: 255)]
  22. private $office;
  23. /**
  24. * Get id
  25. *
  26. * @return int
  27. */
  28. public function getId()
  29. {
  30. return $this->id;
  31. }
  32. /**
  33. * Set office
  34. *
  35. * @param string $office
  36. *
  37. * @return SettingsOffice
  38. */
  39. public function setOffice($office)
  40. {
  41. $this->office = $office;
  42. return $this;
  43. }
  44. /**
  45. * Get office
  46. *
  47. * @return string
  48. */
  49. public function getOffice()
  50. {
  51. return $this->office;
  52. }
  53. /**
  54. * Permite que Symfony y Twig conviertan el objeto a texto automáticamente.
  55. *
  56. * @return string
  57. */
  58. public function __toString()
  59. {
  60. return $this->office ? (string) $this->office : '';
  61. }
  62. }