src/Entity/Cube.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CubeRepository;
  4. use Doctrine\ORM\Mapping\Index as DBIndex;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassCubeRepository::class)]
  7. #[ORM\Table(name'`cube`')]
  8. #[DBIndex(name"cube_prod"columns: ["prod"])]
  9. #[DBIndex(name"cube_size"columns: ["size"])]
  10. #[DBIndex(name"cube_chars"columns: ["chars"])]
  11. #[DBIndex(name"cube_model"columns: ["model"])]
  12. class Cube
  13. {
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column]
  17.     private ?int $id null;
  18.     #[ORM\Column]
  19.     private int $prod 0;
  20.     #[ORM\Column(length50)]
  21.     private string $model '';
  22.     #[ORM\Column]
  23.     private int $size 0;
  24.     #[ORM\Column]
  25.     private int $color 0;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     
  31.     public function getProd(): ?int
  32.     {
  33.         return $this->prod;
  34.     }
  35.     public function setProd(int $prod): self
  36.     {
  37.         $this->prod $prod;
  38.         return $this;
  39.     }
  40.     public function getModel(): ?string
  41.     {
  42.         return $this->model;
  43.     }
  44.     public function setModel(string $model): self
  45.     {
  46.         $this->model $model;
  47.         return $this;
  48.     }
  49.     public function getSize(): ?int
  50.     {
  51.         return $this->size;
  52.     }
  53.     public function setSize(int $size): self
  54.     {
  55.         $this->size $size;
  56.         return $this;
  57.     }
  58.     public function getColor(): ?int
  59.     {
  60.         return $this->color;
  61.     }
  62.     public function setColor(int $color): self
  63.     {
  64.         $this->color $color;
  65.         return $this;
  66.     }
  67. }