src/Entity/Cart.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping\Index;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Repository\CartRepository;
  7. #[ORM\Entity(repositoryClassCartRepository::class)]
  8. #[Index(name"cart_order"columns: ["order_id"])]
  9. #[Index(name"cart_prod"columns: ["prod_id"])]
  10. class Cart implements EntityInterface
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(type'integer')]
  17.     private int $order_id 0;
  18.     #[ORM\ManyToOne]
  19.     private ?Prod $prod null;
  20.     #[ORM\Column]
  21.     private float $price 0;
  22.     #[ORM\Column(typeTypes::SMALLINT)]
  23.     private int $num 0;
  24.     #[ORM\Column(typeTypes::SMALLINT)]
  25.     private int $skidka 0;
  26.     #[ORM\Column(typeTypes::SMALLINT)]
  27.     private int $userdiscount 0;
  28.     #[ORM\Column(typeTypes::SMALLINT)]
  29.     private int $numdiscount 0;
  30.     #[ORM\Column(typeTypes::SMALLINT)]
  31.     private int $sumdiscount 0;
  32.     #[ORM\Column(typeTypes::SMALLINT)]
  33.     private int $promodiscount 0;
  34.     #[ORM\Column]
  35.     private ?int $var null;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getOrderId(): ?int
  41.     {
  42.         return $this->order_id;
  43.     }
  44.     public function setOrderId(int $order): self
  45.     {
  46.         $this->order_id $order;
  47.         return $this;
  48.     }
  49.     public function getPrice(): ?float
  50.     {
  51.         return $this->price;
  52.     }
  53.     public function setPrice(float $price): self
  54.     {
  55.         $this->price $price;
  56.         return $this;
  57.     }
  58.     public function getNum(): ?int
  59.     {
  60.         return $this->num;
  61.     }
  62.     public function setNum(int $num): self
  63.     {
  64.         $this->num $num;
  65.         return $this;
  66.     }
  67.     public function getSkidka(): ?int
  68.     {
  69.         return $this->skidka;
  70.     }
  71.     public function setSkidka(int $skidka): self
  72.     {
  73.         $this->skidka $skidka;
  74.         return $this;
  75.     }
  76.     public function getUserdiscount(): ?int
  77.     {
  78.         return $this->userdiscount;
  79.     }
  80.     public function setUserdiscount(int $userdiscount): self
  81.     {
  82.         $this->userdiscount $userdiscount;
  83.         return $this;
  84.     }
  85.     public function getNumdiscount(): ?int
  86.     {
  87.         return $this->numdiscount;
  88.     }
  89.     public function setNumdiscount(int $numdiscount): self
  90.     {
  91.         $this->numdiscount $numdiscount;
  92.         return $this;
  93.     }
  94.     public function getSumdiscount(): ?int
  95.     {
  96.         return $this->sumdiscount;
  97.     }
  98.     public function setSumdiscount(int $sumdiscount): self
  99.     {
  100.         $this->sumdiscount $sumdiscount;
  101.         return $this;
  102.     }
  103.     public function getPromodiscount(): ?int
  104.     {
  105.         return $this->promodiscount;
  106.     }
  107.     public function setPromodiscount(int $promodiscount): self
  108.     {
  109.         $this->promodiscount $promodiscount;
  110.         return $this;
  111.     }
  112.     public function getVar(): ?int
  113.     {
  114.         return $this->var;
  115.     }
  116.     public function setVar(int $var): self
  117.     {
  118.         $this->var $var;
  119.         return $this;
  120.     }
  121.     public function getProd(): ?Prod
  122.     {
  123.         return $this->prod;
  124.     }
  125.     public function setProd(?Prod $prod): self
  126.     {
  127.         $this->prod $prod;
  128.         return $this;
  129.     }
  130. }