74 lines
1.3 KiB
PHP
74 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="sap_battery")
|
|
*/
|
|
class SAPBattery
|
|
{
|
|
// battery sku
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\Column(type="string", length=25)
|
|
*/
|
|
protected $id;
|
|
|
|
// brand
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="SAPBatteryBrand", inversedBy="batteries")
|
|
* @ORM\JoinColumn(name="brand_id", referencedColumnName="id")
|
|
*/
|
|
protected $brand;
|
|
|
|
// size
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="SAPBatterySize", inversedBy="batteries")
|
|
* @ORM\JoinColumn(name="size_id", referencedColumnName="id")
|
|
*/
|
|
protected $size;
|
|
|
|
|
|
public function __construct()
|
|
{
|
|
}
|
|
|
|
public function setID($id)
|
|
{
|
|
$this->id = $id;
|
|
return $this;
|
|
}
|
|
|
|
public function getID()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function setBrand($brand)
|
|
{
|
|
$this->brand = $brand;
|
|
return $this;
|
|
}
|
|
|
|
public function getBrand()
|
|
{
|
|
return $this->brand;
|
|
}
|
|
|
|
public function setSize($size)
|
|
{
|
|
$this->size = $size;
|
|
return $this;
|
|
}
|
|
|
|
public function getSize()
|
|
{
|
|
return $this->size;
|
|
}
|
|
}
|