'exact'])] class ConstructeurTelephone { use CuidEntityTrait; #[ORM\Id] #[ORM\Column(type: Types::STRING, length: 36)] #[Groups(['constructeur:read'])] private ?string $id = null; #[ORM\ManyToOne(targetEntity: Constructeur::class, inversedBy: 'telephones')] #[ORM\JoinColumn(name: 'constructeurId', referencedColumnName: 'id', nullable: false, onDelete: 'CASCADE')] private ?Constructeur $constructeur = null; #[ORM\Column(type: Types::STRING, length: 50)] #[Assert\NotBlank(message: 'Le numéro de téléphone est obligatoire.')] #[Groups(['constructeur:read', 'constructeur:write'])] private ?string $numero = null; #[ORM\Column(type: Types::STRING, length: 100, nullable: true)] #[Groups(['constructeur:read', 'constructeur:write'])] private ?string $label = null; #[ORM\Column(type: Types::DATETIME_IMMUTABLE, name: 'createdAt')] private DateTimeImmutable $createdAt; #[ORM\Column(type: Types::DATETIME_IMMUTABLE, name: 'updatedAt')] private DateTimeImmutable $updatedAt; public function __construct() { $this->createdAt = new DateTimeImmutable(); $this->updatedAt = new DateTimeImmutable(); } public function getConstructeur(): ?Constructeur { return $this->constructeur; } public function setConstructeur(?Constructeur $constructeur): static { $this->constructeur = $constructeur; return $this; } public function getNumero(): ?string { return $this->numero; } public function setNumero(string $numero): static { $this->numero = $numero; return $this; } public function getLabel(): ?string { return $this->label; } public function setLabel(?string $label): static { $this->label = $label; return $this; } }