Add post and species forms

Squashed commit of the following:
Author: Hugo PRADIER <Hugo.PRADIER2@etu.uca.fr>
Author: bastien ollier <bastien.ollier@etu.uca.fr>
Author: clfreville2 <clement.freville2@etu.uca.fr>
Reviewed on #7
This commit is contained in:
2024-06-07 17:49:12 +02:00
parent 82a3f69fa4
commit 49d60871c9
29 changed files with 740 additions and 86 deletions

View File

@@ -9,6 +9,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: SpeciesRepository::class)]
#[ApiResource(
@@ -26,14 +27,17 @@ class Species
#[ORM\Column(length: 255)]
#[Groups(['species:collection:read'])]
#[Assert\NotBlank]
private ?string $scientific_name = null;
#[ORM\Column(length: 255)]
#[Groups(['species:collection:read'])]
#[Assert\NotBlank]
private ?string $vernacular_name = null;
#[ORM\Column(length: 255)]
#[Groups(['species:collection:read'])]
#[Assert\NotBlank]
private ?string $region = null;
/**