src/Entity/CountryOfSale.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CountryOfSaleRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassCountryOfSaleRepository::class)]
  6. class CountryOfSale
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(targetEntityProducts::class, inversedBy'country')]
  13.     private $product;
  14.     #[ORM\Column(name'country'type'string')]
  15.     private $country;
  16.     #[ORM\Column(name'status'type'boolean'nullabletrue)]
  17.     private $status;
  18.     /**
  19.      * @return mixed
  20.      */
  21.     public function getProduct()
  22.     {
  23.         return $this->product;
  24.     }
  25.     /**
  26.      * @param mixed $product
  27.      */
  28.     public function setProduct($product): void
  29.     {
  30.         $this->product $product;
  31.     }
  32.     /**
  33.      * @return mixed
  34.      */
  35.     public function getCountry()
  36.     {
  37.         return $this->country;
  38.     }
  39.     /**
  40.      * @param mixed $country
  41.      */
  42.     public function setCountry($country): void
  43.     {
  44.         $this->country $country;
  45.     }
  46.     /**
  47.      * @return mixed
  48.      */
  49.     public function getStatus()
  50.     {
  51.         return $this->status;
  52.     }
  53.     /**
  54.      * @param mixed $status
  55.      */
  56.     public function setStatus($status): void
  57.     {
  58.         $this->status $status;
  59.     }
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function __toString()
  65.     {
  66.         return $this->country;
  67.     }
  68. }