src/Entity/CustomFieldSetting.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CustomFieldSettingRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Timestampable\Traits\TimestampableEntity;
  6. #[ORM\Entity(repositoryClass: CustomFieldSettingRepository::class)]
  7. class CustomFieldSetting
  8. {
  9. use TimestampableEntity;
  10. /**
  11. * @var int
  12. */
  13. #[ORM\Id]
  14. #[ORM\GeneratedValue]
  15. #[ORM\Column(type: 'integer')]
  16. private $id;
  17. /**
  18. * @var Company
  19. */
  20. #[ORM\JoinColumn(nullable: false)]
  21. #[ORM\ManyToOne(targetEntity: Company::class, inversedBy: 'customFieldSettings')]
  22. private $company;
  23. /**
  24. * @var CustomField
  25. */
  26. #[ORM\JoinColumn(nullable: false)]
  27. #[ORM\ManyToOne(targetEntity: CustomField::class)]
  28. private $customField;
  29. /**
  30. * @var string|null
  31. */
  32. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  33. private $name;
  34. public function getCompany(): ?Company
  35. {
  36. return $this->company;
  37. }
  38. public function setCompany(?Company $company): self
  39. {
  40. $this->company = $company;
  41. return $this;
  42. }
  43. public function getId(): ?int
  44. {
  45. return $this->id;
  46. }
  47. public function getName(): ?string
  48. {
  49. return $this->name;
  50. }
  51. public function setName(?string $name): self
  52. {
  53. $this->name = $name;
  54. return $this;
  55. }
  56. public function getCustomField(): ?CustomField
  57. {
  58. return $this->customField;
  59. }
  60. public function setCustomField(?CustomField $customField): self
  61. {
  62. $this->customField = $customField;
  63. return $this;
  64. }
  65. }