Created
December 2, 2015 18:44
-
-
Save eminetto/e0b2e89ae2c899d2c61f to your computer and use it in GitHub Desktop.
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 Beer\Model; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="Beer") | |
*/ | |
class Beer | |
{ | |
/** | |
* @ORM\Id @ORM\Column(type="integer") | |
* @ORM\GeneratedValue | |
* @var integer | |
*/ | |
private $id; | |
/** | |
* @ORM\Column(type="string", length=150) | |
* | |
* @var string | |
*/ | |
private $name; | |
/** | |
* @ORM\Column(type="float", nullable=true) | |
* | |
* @var string | |
*/ | |
private $abv; | |
/** | |
* @ORM\ManyToOne(targetEntity="Style", inversedBy="beerCollection", cascade={"persist", "merge", "refresh"}) | |
*/ | |
private $style; | |
/** | |
* @ORM\ManyToOne(targetEntity="Brewery", inversedBy="beerCollection", cascade={"persist", "merge", "refresh"}) | |
*/ | |
private $brewery; | |
public function getId() | |
{ | |
return $this->id; | |
} | |
public function getName() | |
{ | |
return $this->name; | |
} | |
public function setName($name) | |
{ | |
return $this->name = $name; | |
} | |
public function getAbv() | |
{ | |
return $this->abv; | |
} | |
public function setAbv($abv) | |
{ | |
return $this->abv = $abv; | |
} | |
public function getStyle() | |
{ | |
return $this->style; | |
} | |
public function setStyle($style) | |
{ | |
return $this->style = $style; | |
} | |
public function getBrewery() | |
{ | |
return $this->brewery; | |
} | |
public function setBrewery($brewery) | |
{ | |
return $this->brewery = $brewery; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment