src/Entity/Warehouses.php line 24

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping\Id;
  4. use Doctrine\ORM\Mapping\Index;
  5. use Doctrine\ORM\Mapping\Entity;
  6. use Doctrine\ORM\Mapping\Table;
  7. use Doctrine\ORM\Mapping\Column;
  8. use Doctrine\ORM\Mapping\JoinColumn;
  9. use Doctrine\ORM\Mapping\ManyToOne;
  10. use Doctrine\ORM\Mapping\OneToOne;
  11. use Doctrine\ORM\Mapping\OneToMany;
  12. use Doctrine\ORM\Mapping\GeneratedValue;
  13. use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
  14. /**
  15.  * Warehouses
  16.  */
  17. #[Entity(repositoryClass\App\Repository\WarehousesRepository::class)]
  18. #[Table(name'warehouses')]
  19. #[Index(name'city_fk_idx'columns: ['city_id'])]
  20. #[Index(name'warehouses_company_fk_idx'columns: ['company_id'])]
  21. class Warehouses
  22. {
  23.     /**
  24.      * @var integer
  25.      */
  26.     #[Column(name'warehouse_id'type'integer'nullablefalse)]
  27.     #[Id]
  28.     #[GeneratedValue(strategy'IDENTITY')]
  29.     private $warehouseId;
  30.     /**
  31.      * @var string
  32.      */
  33.     #[Column(name'name'type'string'length100nullabletrue)]
  34.     private $name;
  35.     /**
  36.      * @var string
  37.      */
  38.     #[Column(name'address'type'text'length65535nullabletrue)]
  39.     private $address;
  40.     /**
  41.      * @var string
  42.      */
  43.     #[Column(name'telephone'type'string'length50nullabletrue)]
  44.     private $telephone;
  45.     /**
  46.      * @var boolean
  47.      */
  48.     #[Column(name'is_active'type'boolean'nullabletrue)]
  49.     private $isActive;
  50.     /**
  51.      * @var \Cities
  52.      */
  53.     #[ManyToOne(targetEntity\Cities::class)]
  54.     #[JoinColumn(name'city_id'referencedColumnName'city_id')]
  55.     private $city;
  56.     /**
  57.      * @var \Companies
  58.      */
  59.     #[ManyToOne(targetEntity\Companies::class)]
  60.     #[JoinColumn(name'company_id'referencedColumnName'company_id')]
  61.     private $company;
  62.     /**
  63.      * Get warehouseId
  64.      *
  65.      * @return integer
  66.      */
  67.     public function getWarehouseId()
  68.     {
  69.         return $this->warehouseId;
  70.     }
  71.     /**
  72.      * Set warehouseId
  73.      *
  74.      * @param integer $warehouseId
  75.      *
  76.      * @return Warehouses
  77.      */
  78.     public function setWarehouseId($warehouseId)
  79.     {
  80.         $this->warehouseId $warehouseId;
  81.         return $this;
  82.     }
  83.     /**
  84.      * Set name
  85.      *
  86.      * @param string $name
  87.      *
  88.      * @return Warehouses
  89.      */
  90.     public function setName($name)
  91.     {
  92.         $this->name $name;
  93.         return $this;
  94.     }
  95.     /**
  96.      * Get name
  97.      *
  98.      * @return string
  99.      */
  100.     public function getName()
  101.     {
  102.         return $this->name;
  103.     }
  104.     /**
  105.      * Set address
  106.      *
  107.      * @param string $address
  108.      *
  109.      * @return Warehouses
  110.      */
  111.     public function setAddress($address)
  112.     {
  113.         $this->address $address;
  114.         return $this;
  115.     }
  116.     /**
  117.      * Get address
  118.      *
  119.      * @return string
  120.      */
  121.     public function getAddress()
  122.     {
  123.         return $this->address;
  124.     }
  125.     /**
  126.      * Set telephone
  127.      *
  128.      * @param string $telephone
  129.      *
  130.      * @return Warehouses
  131.      */
  132.     public function setTelephone($telephone)
  133.     {
  134.         $this->telephone $telephone;
  135.         return $this;
  136.     }
  137.     /**
  138.      * Get telephone
  139.      *
  140.      * @return string
  141.      */
  142.     public function getTelephone()
  143.     {
  144.         return $this->telephone;
  145.     }
  146.     /**
  147.      * Set isActive
  148.      *
  149.      * @param boolean $isActive
  150.      *
  151.      * @return Warehouses
  152.      */
  153.     public function setIsActive($isActive)
  154.     {
  155.         $this->isActive $isActive;
  156.         return $this;
  157.     }
  158.     /**
  159.      * Get isActive
  160.      *
  161.      * @return boolean
  162.      */
  163.     public function getIsActive()
  164.     {
  165.         return $this->isActive;
  166.     }
  167.     /**
  168.      * Set city
  169.      *
  170.      *
  171.      * @return Warehouses
  172.      */
  173.     public function setCity(\App\Entity\Cities $city null)
  174.     {
  175.         $this->city $city;
  176.         return $this;
  177.     }
  178.     /**
  179.      * Get city
  180.      *
  181.      * @return \App\Entity\Cities
  182.      */
  183.     public function getCity()
  184.     {
  185.         return $this->city;
  186.     }
  187.     /**
  188.      * Set company
  189.      *
  190.      *
  191.      * @return Warehouses
  192.      */
  193.     public function setCompany(\App\Entity\Companies $company null)
  194.     {
  195.         $this->company $company;
  196.         return $this;
  197.     }
  198.     /**
  199.      * Get company
  200.      *
  201.      * @return \App\Entity\Companies
  202.      */
  203.     public function getCompany()
  204.     {
  205.         return $this->company;
  206.     }
  207. }