District.php
Código PHP:
<?php
namespace VnfqInstComBundleEntity;
use DoctrineORMMapping as ORM;
use DoctrineCommonCollectionsArrayCollection;
/**
* District
*
* @ORM\Table(name="districts_brasil")
* @ORM\Entity(repositoryClass="Vnfq\InstComBundle\Repository\DistrictRepository")
*/
class District
{
/**
* @ORM\OneToMany(targetEntity="InstCom", mappedBy="district")
*/
protected $instCom;
public function __construct()
{
$this->instCom = new ArrayCollection();
}
/**
* @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=100)
*/
private $name;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return District
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Add instCom
*
* @param \Vnfq\InstComBundle\Entity\InstCom $instCom
* @return District
*/
public function addInstCom(VnfqInstComBundleEntityInstCom $instCom)
{
$this->instCom[] = $instCom;
return $this;
}
/**
* Remove instCom
*
* @param \Vnfq\InstComBundle\Entity\InstCom $instCom
*/
public function removeInstCom(VnfqInstComBundleEntityInstCom $instCom)
{
$this->instCom->removeElement($instCom);
}
/**
* Get instCom
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getInstCom()
{
return $this->instCom;
}
}
State.php
Código PHP:
<?php
namespace VnfqInstComBundleEntity;
use DoctrineORMMapping as ORM;
use DoctrineCommonCollectionsArrayCollection;
/**
* State
*
* @ORM\Table(name="states_brasil")
* @ORM\Entity(repositoryClass="Vnfq\InstComBundle\Repository\StateRepository")
*/
class State
{
/**
* @ORM\OneToMany(targetEntity="InstCom", mappedBy="state")
*/
protected $instCom;
public function __construct()
{
$this->instCom = new ArrayCollection();
}
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="initials", type="string", length=10)
*/
private $initials;
/**
* @var string
*
* @ORM\Column(name="state", type="string", length=50)
*/
private $state;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set initials
*
* @param string $initials
* @return State
*/
public function setInitials($initials)
{
$this->initials = $initials;
return $this;
}
/**
* Get initials
*
* @return string
*/
public function getInitials()
{
return $this->initials;
}
/**
* Set state
*
* @param string $state
* @return State
*/
public function setState($state)
{
$this->state = $state;
return $this;
}
/**
* Get state
*
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* Add instCom
*
* @param \Vnfq\InstComBundle\Entity\InstCom $instCom
* @return State
*/
public function addInstCom(VnfqInstComBundleEntityInstCom $instCom)
{
$this->instCom[] = $instCom;
return $this;
}
/**
* Remove instCom
*
* @param \Vnfq\InstComBundle\Entity\InstCom $instCom
*/
public function removeInstCom(VnfqInstComBundleEntityInstCom $instCom)
{
$this->instCom->removeElement($instCom);
}
/**
* Get instCom
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getInstCom()
{
return $this->instCom;
}
}