Created
January 13, 2019 12:13
-
-
Save NandoKstroNet/1c9ab917400a9eb9562fda8de960f2b5 to your computer and use it in GitHub Desktop.
Product entity criado em nossa série sobre Symfony 4 com GraphQL - Code Experts Learning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity(repositoryClass="App\Repository\ProductRepository") | |
*/ | |
class Product | |
{ | |
/** | |
* @ORM\Id() | |
* @ORM\GeneratedValue() | |
* @ORM\Column(type="integer") | |
*/ | |
private $id; | |
/** | |
* @ORM\Column(type="string", length=255) | |
*/ | |
private $name; | |
/** | |
* @ORM\Column(type="float") | |
*/ | |
private $price; | |
/** | |
* @ORM\Column(type="text") | |
*/ | |
private $description; | |
/** | |
* @ORM\Column(type="string", length=255) | |
*/ | |
private $slug; | |
public function getId(): ?int | |
{ | |
return $this->id; | |
} | |
public function getName(): ?string | |
{ | |
return $this->name; | |
} | |
public function setName(string $name): self | |
{ | |
$this->name = $name; | |
return $this; | |
} | |
public function getPrice(): ?float | |
{ | |
return $this->price; | |
} | |
public function setPrice(float $price): self | |
{ | |
$this->price = $price; | |
return $this; | |
} | |
public function getDescription(): ?string | |
{ | |
return $this->description; | |
} | |
public function setDescription(string $description): self | |
{ | |
$this->description = $description; | |
return $this; | |
} | |
public function getSlug(): ?string | |
{ | |
return $this->slug; | |
} | |
public function setSlug(string $slug): self | |
{ | |
$this->slug = $slug; | |
return $this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment