add form species

This commit is contained in:
Hugo PRADIER
2024-06-05 11:36:46 +02:00
parent 48bc5fd8c3
commit 247f9e6a01
7 changed files with 108 additions and 15 deletions

View File

@@ -6,6 +6,7 @@ use App\Repository\SpeciesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: SpeciesRepository::class)]
class Species
@@ -16,12 +17,15 @@ class Species
private ?int $id = null;
#[ORM\Column(length: 255)]
#[Assert\NotBlank]
private ?string $scientific_name = null;
#[ORM\Column(length: 255)]
#[Assert\NotBlank]
private ?string $vernacular_name = null;
#[ORM\Column(length: 255)]
#[Assert\NotBlank]
private ?string $region = null;
/**