Koshceyshka

Untitled

Dec 14th, 2020
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. <?php
  2. // src/Product.php
  3. namespace App\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5.  
  6. /**
  7.  * @ORM\Entity
  8.  * @ORM\Table(name="products")
  9.  */
  10. class Product
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\Column(type="integer")
  15.      * @ORM\GeneratedValue
  16.      */
  17.     protected $id;
  18.    
  19.     /**
  20.      * @ORM\Column(type="string")
  21.      */
  22.     protected $name;
  23.  
  24.     // .. (other code)
  25.  
  26.     public function getId()
  27.     {
  28.         return $this->id;
  29.     }
  30.  
  31.     public function getName()
  32.     {
  33.         return $this->name;
  34.     }
  35.  
  36.     public function setName($name)
  37.     {
  38.         $this->name = $name;
  39.     }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment