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]
  33.     private ?int $var null;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getOrderId(): ?int
  39.     {
  40.         return $this->order_id;
  41.     }
  42.     public function setOrderId(int $order): self
  43.     {
  44.         $this->order_id $order;
  45.         return $this;
  46.     }
  47.     public function getPrice(): ?float
  48.     {
  49.         return $this->price;
  50.     }
  51.     public function setPrice(float $price): self
  52.     {
  53.         $this->price $price;
  54.         return $this;
  55.     }
  56.     public function getNum(): ?int
  57.     {
  58.         return $this->num;
  59.     }
  60.     public function setNum(int $num): self
  61.     {
  62.         $this->num $num;
  63.         return $this;
  64.     }
  65.     public function getSkidka(): ?int
  66.     {
  67.         return $this->skidka;
  68.     }
  69.     public function setSkidka(int $skidka): self
  70.     {
  71.         $this->skidka $skidka;
  72.         return $this;
  73.     }
  74.     public function getUserdiscount(): ?int
  75.     {
  76.         return $this->userdiscount;
  77.     }
  78.     public function setUserdiscount(int $userdiscount): self
  79.     {
  80.         $this->userdiscount $userdiscount;
  81.         return $this;
  82.     }
  83.     public function getNumdiscount(): ?int
  84.     {
  85.         return $this->numdiscount;
  86.     }
  87.     public function setNumdiscount(int $numdiscount): self
  88.     {
  89.         $this->numdiscount $numdiscount;
  90.         return $this;
  91.     }
  92.     public function getSumdiscount(): ?int
  93.     {
  94.         return $this->sumdiscount;
  95.     }
  96.     public function setSumdiscount(int $sumdiscount): self
  97.     {
  98.         $this->sumdiscount $sumdiscount;
  99.         return $this;
  100.     }
  101.     public function getVar(): ?int
  102.     {
  103.         return $this->var;
  104.     }
  105.     public function setVar(int $var): self
  106.     {
  107.         $this->var $var;
  108.         return $this;
  109.     }
  110.     public function getProd(): ?Prod
  111.     {
  112.         return $this->prod;
  113.     }
  114.     public function setProd(?Prod $prod): self
  115.     {
  116.         $this->prod $prod;
  117.         return $this;
  118.     }
  119. }