<?php
/**
* Created by PhpStorm.
* User: apple
* Date: 29/03/19
* Time: 2:53 PM
*/
namespace App\AppBundle\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use JsonSerializable;
/**
* AddOns
*
* @ORM\Entity
* @ORM\Table(name="wp_timezone")
* @ORM\HasLifecycleCallbacks()
*/
class WP_TimeZone implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $value;
/**
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $offset;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Assert\NotBlank()
*/
private $isdst;
/**
* @ORM\Column(type="integer", nullable=true)
* @Assert\NotBlank()
*/
private $seq_number;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $abbr;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $text;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Assert\NotBlank()
*/
private $active;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getSeqNumber()
{
return $this->seq_number;
}
/**
* @param mixed $seq_number
*/
public function setSeqNumber($seq_number)
{
$this->seq_number = $seq_number;
}
/**
* @return mixed
*/
public function getValue()
{
return $this->value;
}
/**
* @param mixed $value
*/
public function setValue($value)
{
$this->value = $value;
}
/**
* @return mixed
*/
public function getOffset()
{
return $this->offset;
}
/**
* @param mixed $offset
*/
public function setOffset($offset)
{
$this->offset = $offset;
}
/**
* @return mixed
*/
public function getIsdst()
{
return $this->isdst;
}
/**
* @param mixed $isdst
*/
public function setIsdst($isdst)
{
$this->isdst = $isdst;
}
/**
* @return mixed
*/
public function getAbbr()
{
return $this->abbr;
}
/**
* @param mixed $abbr
*/
public function setAbbr($abbr)
{
$this->abbr = $abbr;
}
/**
* @return mixed
*/
public function getText()
{
return $this->text;
}
/**
* @param mixed $text
*/
public function setText($text)
{
$this->text = $text;
}
/**
* @return mixed
*/
public function getActive()
{
return $this->active;
}
/**
* @param mixed $active
*/
public function setActive($active)
{
$this->active = $active;
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
'value' => $this->value,
'abbr' => $this->abbr,
'active' => $this->active,
'isdst' => $this->isdst,
'offset' => $this->offset,
'seq_number' => $this->seq_number,
'text' => $this->text,
);
}
/**
* @var string $created
*
* @ORM\Column(name="created_at", type="string", nullable=false)
*/
protected $createdAt;
/**
* @var string $updated
*
* @ORM\Column(name="updated_at", type="string", nullable=false)
*/
protected $updatedAt;
public function getCreatedAt()
{
return $this->createdAt;
}
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function updatedTimestamps()
{
$this->setUpdatedAt(round(microtime(true) * 1000));
if ($this->getCreatedAt() === null) {
$this->setCreatedAt(round(microtime(true) * 1000));
}
}
public function __construct() {
$this->setCreatedAt(round(microtime(true) * 1000));
}
}