Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created December 2, 2015 18:44
Show Gist options
  • Save eminetto/e0b2e89ae2c899d2c61f to your computer and use it in GitHub Desktop.
Save eminetto/e0b2e89ae2c899d2c61f to your computer and use it in GitHub Desktop.
<?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