resq/src/Entity/SAPBatteryContainerSize.php
2020-12-07 05:48:48 +00:00

56 lines
996 B
PHP

<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="sap_battery_container_size")
*/
class SAPBatteryContainerSize
{
// unique id
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
// name
/**
* @ORM\Column(type="string", length=50)
* @Assert\NotBlank()
*/
protected $name;
// battery
/**
* @ORM\OneToMany(targetEntity="Battery", mappedBy="size")
*/
protected $batteries;
public function __construct()
{
$this->batteries = new ArrayCollection();
}
public function getID()
{
return $this->id;
}
public function setName($name)
{
$this->name = $name;
return $this;
}
public function getName()
{
return $this->name;
}
}