Created
February 26, 2018 16:45
-
-
Save NandoKstroNet/c32ddf1ba06ec665316415b0a9b84248 to your computer and use it in GitHub Desktop.
Entidade Beer, criada na serie sobre API com Symfony 3.4 da 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 APIBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Beer | |
* | |
* @ORM\Table(name="beers") | |
* @ORM\Entity(repositoryClass="APIBundle\Repository\BeerRepository") | |
*/ | |
class Beer | |
{ | |
/** | |
* @var int | |
* | |
* @ORM\Column(name="id", type="integer") | |
* @ORM\Id | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
private $id; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="name", type="string", length=255) | |
*/ | |
private $name; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="description", type="string", length=255) | |
*/ | |
private $description; | |
/** | |
* @ORM\Column(type="float") | |
*/ | |
private $price; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="slug", type="string", length=255) | |
*/ | |
private $slug; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="type", type="string", length=255) | |
*/ | |
private $type; | |
/** | |
* @var int | |
* | |
* @ORM\Column(name="abv", type="integer") | |
*/ | |
private $abv; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="brewed_by", type="string", length=255) | |
*/ | |
private $brewedBy; | |
/** | |
* @var \DateTime | |
* | |
* @ORM\Column(name="created_at", type="datetime") | |
*/ | |
private $createdAt; | |
/** | |
* @var \DateTime | |
* | |
* @ORM\Column(name="updated_at", type="datetime") | |
*/ | |
private $updatedAt; | |
/** | |
* Get id | |
* | |
* @return int | |
*/ | |
public function getId() | |
{ | |
return $this->id; | |
} | |
/** | |
* Set name | |
* | |
* @param string $name | |
* | |
* @return Beer | |
*/ | |
public function setName($name) | |
{ | |
$this->name = $name; | |
return $this; | |
} | |
/** | |
* Get name | |
* | |
* @return string | |
*/ | |
public function getName() | |
{ | |
return $this->name; | |
} | |
/** | |
* Set description | |
* | |
* @param string $description | |
* | |
* @return Beer | |
*/ | |
public function setDescription($description) | |
{ | |
$this->description = $description; | |
return $this; | |
} | |
/** | |
* Get description | |
* | |
* @return string | |
*/ | |
public function getDescription() | |
{ | |
return $this->description; | |
} | |
/** | |
* Get price | |
* | |
* @return float | |
*/ | |
public function getPrice() | |
{ | |
return $this->price; | |
} | |
/** | |
* Set price | |
* | |
* @param mixed $price | |
* | |
* @return Beer | |
*/ | |
public function setPrice($price) | |
{ | |
$this->price = $price; | |
return $this; | |
} | |
/** | |
* Set slug | |
* | |
* @param string $slug | |
* | |
* @return Beer | |
*/ | |
public function setSlug($slug) | |
{ | |
$this->slug = $slug; | |
return $this; | |
} | |
/** | |
* Get slug | |
* | |
* @return string | |
*/ | |
public function getSlug() | |
{ | |
return $this->slug; | |
} | |
/** | |
* Set type | |
* | |
* @param string $type | |
* | |
* @return Beer | |
*/ | |
public function setType($type) | |
{ | |
$this->type = $type; | |
return $this; | |
} | |
/** | |
* Get type | |
* | |
* @return string | |
*/ | |
public function getType() | |
{ | |
return $this->type; | |
} | |
/** | |
* Set abv | |
* | |
* @param integer $abv | |
* | |
* @return Beer | |
*/ | |
public function setAbv($abv) | |
{ | |
$this->abv = $abv; | |
return $this; | |
} | |
/** | |
* Get abv | |
* | |
* @return int | |
*/ | |
public function getAbv() | |
{ | |
return $this->abv; | |
} | |
/** | |
* Set brewedBy | |
* | |
* @param string $brewedBy | |
* | |
* @return Beer | |
*/ | |
public function setBrewedBy($brewedBy) | |
{ | |
$this->brewedBy = $brewedBy; | |
return $this; | |
} | |
/** | |
* Get brewedBy | |
* | |
* @return string | |
*/ | |
public function getBrewedBy() | |
{ | |
return $this->brewedBy; | |
} | |
/** | |
* Set createdAt | |
* | |
* @param \DateTime $createdAt | |
* | |
* @return Beer | |
*/ | |
public function setCreatedAt($createdAt) | |
{ | |
$this->createdAt = $createdAt; | |
return $this; | |
} | |
/** | |
* Get createdAt | |
* | |
* @return \DateTime | |
*/ | |
public function getCreatedAt() | |
{ | |
return $this->createdAt; | |
} | |
/** | |
* Set updatedAt | |
* | |
* @param \DateTime $updatedAt | |
* | |
* @return Beer | |
*/ | |
public function setUpdatedAt($updatedAt) | |
{ | |
$this->updatedAt = $updatedAt; | |
return $this; | |
} | |
/** | |
* Get updatedAt | |
* | |
* @return \DateTime | |
*/ | |
public function getUpdatedAt() | |
{ | |
return $this->updatedAt; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment