<?php
/**
* Created by PhpStorm.
* User: parcel
* Date: 8/24/18
* Time: 7:45 PM
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\Ignore;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\StationRepository")
* @ORM\Table(name="station")
*/
class Station {
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @Assert\NotBlank(message="Please Enter the station name")
* @ORM\Column(type="string")
*/
private $stationName;
/**
* @Assert\NotBlank(message="Please Enter the station name")
* @ORM\Column(type="text")
*/
private $stationAddress;
//@Assert\NotBlank(message="Please Enter the phone numbers")
/**
* @ORM\Column(type="text", nullable=true)
*/
private $phone_numbers;
/**
* @Ignore
* @var \App\Entity\Organization
* @Serializer\Type("App\Entity\Organization")
* @ORM\ManyToOne(targetEntity="App\Entity\Organization")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="organization_id", referencedColumnName="id")
* })
*/
private $organization;
/**
* @Serializer\Type("DateTime<'d/m/Y'>")
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="string")
*/
private $operatingHrs;
/**
* @Ignore
* @var User
* @Serializer\Type("App\Entity\User")
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="created_by", referencedColumnName="id")
* })
*/
private $createdBy;
/**
* @ORM\Column(type="boolean")
*/
private $isMobile;
/**
* @ORM\Column(type="boolean")
*/
private $isActive;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return mixed
*/
public function getStationName()
{
return $this->stationName;
}
/**
* @param mixed $stationName
*/
public function setStationName($stationName)
{
$this->stationName = $stationName;
}
/**
* @return mixed
*/
public function getStationAddress()
{
return $this->stationAddress;
}
/**
* @param mixed $stationAddress
*/
public function setStationAddress($stationAddress)
{
$this->stationAddress = $stationAddress;
}
/**
* @return mixed
*/
public function getPhoneNumbers()
{
return $this->phone_numbers;
}
/**
* @param mixed $phone_numbers
*/
public function setPhoneNumbers($phone_numbers)
{
$this->phone_numbers = $phone_numbers;
}
/**
* @return Organization
*/
public function getOrganization()
{
return $this->organization;
}
/**
* @param Organization $organization
*/
public function setOrganization($organization)
{
$this->organization = $organization;
}
/**
* @return mixed
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param mixed $createdAt
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
}
/**
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* @param User $createdBy
*/
public function setCreatedBy($createdBy)
{
$this->createdBy = $createdBy;
}
/**
* @return mixed
*/
public function getOperatingHrs()
{
return $this->operatingHrs;
}
/**
* @param mixed $operatingHrs
*/
public function setOperatingHrs($operatingHrs): void
{
$this->operatingHrs = $operatingHrs;
}
/**
* @return mixed
*/
public function getIsMobile()
{
return $this->isMobile;
}
/**
* @param mixed $isMobile
*/
public function setIsMobile(mixed $isMobile): void
{
$this->isMobile = $isMobile;
}
/**
* @return mixed
*/
public function getIsActive()
{
return $this-isActive;
}
/**
* @param mixed $isActive
*/
public function setIsActive(mixed $isActive): void
{
$this->isActive = $isActive;
}
public function __toString()
{
// TODO: Implement __toString() method.
return $this->stationName;
}
}