src/Entity/Warehouses.php line 24
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Index;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Table;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\ManyToOne;
use Doctrine\ORM\Mapping\OneToOne;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
/**
* Warehouses
*/
#[Entity(repositoryClass: \App\Repository\WarehousesRepository::class)]
#[Table(name: 'warehouses')]
#[Index(name: 'city_fk_idx', columns: ['city_id'])]
#[Index(name: 'warehouses_company_fk_idx', columns: ['company_id'])]
class Warehouses
{
/**
* @var integer
*/
#[Column(name: 'warehouse_id', type: 'integer', nullable: false)]
#[Id]
#[GeneratedValue(strategy: 'IDENTITY')]
private $warehouseId;
/**
* @var string
*/
#[Column(name: 'name', type: 'string', length: 100, nullable: true)]
private $name;
/**
* @var string
*/
#[Column(name: 'address', type: 'text', length: 65535, nullable: true)]
private $address;
/**
* @var string
*/
#[Column(name: 'telephone', type: 'string', length: 50, nullable: true)]
private $telephone;
/**
* @var boolean
*/
#[Column(name: 'is_active', type: 'boolean', nullable: true)]
private $isActive;
/**
* @var \Cities
*/
#[ManyToOne(targetEntity: \Cities::class)]
#[JoinColumn(name: 'city_id', referencedColumnName: 'city_id')]
private $city;
/**
* @var \Companies
*/
#[ManyToOne(targetEntity: \Companies::class)]
#[JoinColumn(name: 'company_id', referencedColumnName: 'company_id')]
private $company;
/**
* Get warehouseId
*
* @return integer
*/
public function getWarehouseId()
{
return $this->warehouseId;
}
/**
* Set warehouseId
*
* @param integer $warehouseId
*
* @return Warehouses
*/
public function setWarehouseId($warehouseId)
{
$this->warehouseId = $warehouseId;
return $this;
}
/**
* Set name
*
* @param string $name
*
* @return Warehouses
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set address
*
* @param string $address
*
* @return Warehouses
*/
public function setAddress($address)
{
$this->address = $address;
return $this;
}
/**
* Get address
*
* @return string
*/
public function getAddress()
{
return $this->address;
}
/**
* Set telephone
*
* @param string $telephone
*
* @return Warehouses
*/
public function setTelephone($telephone)
{
$this->telephone = $telephone;
return $this;
}
/**
* Get telephone
*
* @return string
*/
public function getTelephone()
{
return $this->telephone;
}
/**
* Set isActive
*
* @param boolean $isActive
*
* @return Warehouses
*/
public function setIsActive($isActive)
{
$this->isActive = $isActive;
return $this;
}
/**
* Get isActive
*
* @return boolean
*/
public function getIsActive()
{
return $this->isActive;
}
/**
* Set city
*
*
* @return Warehouses
*/
public function setCity(\App\Entity\Cities $city = null)
{
$this->city = $city;
return $this;
}
/**
* Get city
*
* @return \App\Entity\Cities
*/
public function getCity()
{
return $this->city;
}
/**
* Set company
*
*
* @return Warehouses
*/
public function setCompany(\App\Entity\Companies $company = null)
{
$this->company = $company;
return $this;
}
/**
* Get company
*
* @return \App\Entity\Companies
*/
public function getCompany()
{
return $this->company;
}
}