src/Domain/Entity/GrateStep.php line 14

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Domain\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Domain\Repository\GrateStepRepository")
  8.  * @ORM\Table(name="grate_step_app")
  9.  */
  10. class GrateStep extends AbstractEntity
  11. {
  12.     public function __toString(): string
  13.     {
  14.         return $this->grateType;
  15.     }
  16.     
  17.     /**
  18.      * @ORM\Column(type="string")
  19.      * @Assert\NotBlank(message="Veuillez renseigner les champs vides")
  20.      */
  21.     public string $grateType// "standard", "doubleLimon", "turning"
  22.     /**
  23.      * @ORM\Column(type="decimal", precision=10, scale=2)
  24.      * @Assert\NotBlank(message="Veuillez renseigner les champs vides")
  25.      */
  26.     public string $price;
  27.     // Getters and setters...
  28.     public function getGrateType(): string
  29.     {
  30.         return $this->grateType;
  31.     }
  32.     public function setGrateType(string $grateType): void {
  33.         $this->grateType $grateType;
  34.     }
  35.     public function getPrice(): string
  36.     {
  37.         return $this->price;
  38.     }
  39.     public function setPrice(string $price): void {
  40.         $this->price $price;
  41.     }
  42. }