create first working communication
This commit is contained in:
116
src/Mine/SeekerBundle/Entity/GridRow.php
Normal file
116
src/Mine/SeekerBundle/Entity/GridRow.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace Mine\SeekerBundle\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* GridRow
|
||||
*
|
||||
* @ORM\Table(name="grid_row")
|
||||
* @ORM\Entity(repositoryClass="Mine\SeekerBundle\Repository\GridRowRepository")
|
||||
*/
|
||||
class GridRow
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var Grid
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Mine\SeekerBundle\Entity\Grid", inversedBy="gridRow", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="grid", referencedColumnName="id", onDelete="CASCADE")
|
||||
*/
|
||||
private $grid;
|
||||
|
||||
/**
|
||||
* @var GridCol
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="Mine\SeekerBundle\Entity\GridCol", mappedBy="gridCol", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="grid_row", referencedColumnName="id", onDelete="CASCADE")
|
||||
*/
|
||||
private $gridCol;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->gridCol = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add gridCol
|
||||
*
|
||||
* @param GridCol $gridCol
|
||||
*
|
||||
* @return GridRow
|
||||
*/
|
||||
public function addGridCol(GridCol $gridCol)
|
||||
{
|
||||
$this->gridCol[] = $gridCol;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove gridCol
|
||||
*
|
||||
* @param GridCol $gridCol
|
||||
*/
|
||||
public function removeGridCol(GridCol $gridCol)
|
||||
{
|
||||
$this->gridCol->removeElement($gridCol);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gridCol
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getGridCol()
|
||||
{
|
||||
return $this->gridCol;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set grid
|
||||
*
|
||||
* @param Grid $grid
|
||||
*
|
||||
* @return GridRow
|
||||
*/
|
||||
public function setGrid(Grid $grid = null)
|
||||
{
|
||||
$this->grid = $grid;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get grid
|
||||
*
|
||||
* @return Grid
|
||||
*/
|
||||
public function getGrid()
|
||||
{
|
||||
return $this->grid;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user