src/Entity/Coupon.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CouponRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=CouponRepository::class)
  7.  */
  8. class Coupon
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private ?int $id null;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @ORM\Column(type="string", length=16)
  22.      */
  23.     private $type;
  24.     /**
  25.      * @ORM\Column(type="string", length=32)
  26.      */
  27.     private $value;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Shop::class, inversedBy="coupons", cascade={"persist"})
  30.      * @ORM\JoinColumn(nullable=false)
  31.      */
  32.     private $shop;
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getName(): ?string
  38.     {
  39.         return $this->name;
  40.     }
  41.     public function setName(string $name): static
  42.     {
  43.         $this->name $name;
  44.         return $this;
  45.     }
  46.     public function getType(): ?string
  47.     {
  48.         return $this->type;
  49.     }
  50.     public function setType(string $type): static
  51.     {
  52.         $this->type $type;
  53.         return $this;
  54.     }
  55.     public function getValue(): ?string
  56.     {
  57.         return $this->value;
  58.     }
  59.     public function setValue(string $value): static
  60.     {
  61.         $this->value $value;
  62.         return $this;
  63.     }
  64.     public function getShop(): ?Shop
  65.     {
  66.         return $this->shop;
  67.     }
  68.     public function setShop(?Shop $shop): static
  69.     {
  70.         $this->shop $shop;
  71.         return $this;
  72.     }
  73. }