Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- declare(strict_types = 1);
- namespace App\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\Validator\Constraints as Assert;
- /**
- * @ORM\Entity()
- */
- class Article
- {
- /**
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- * @ORM\Column(type="integer", options={"unsigned":true})
- *
- * @var int
- */
- protected $id;
- /**
- * @ORM\Column(type="string", length=115, nullable=false)
- *
- * @Assert\Type(type="string")
- * @Assert\Length(max="115")
- * @Assert\NotBlank()
- *
- * @var string
- */
- protected $titre;
- public function getId(): ?int
- {
- return $this->id;
- }
- public function setId(int $id): void
- {
- $this->id = $id;
- }
- public function getTitre(): ?string
- {
- return $this->titre;
- }
- public function setTitre(string $titre): void
- {
- $this->titre = $titre;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement