<?php
/**
* Created by PhpStorm.
* User: apple
* Date: 29/03/19
* Time: 2:23 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="user_not_registered")
* @ORM\HasLifecycleCallbacks()
*/
class User_Not_Registered implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $notification_token;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $address;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $country;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $city;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $state;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $county;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getNotificationToken()
{
return $this->notification_token;
}
/**
* @param mixed $notification_token
*/
public function setNotificationToken($notification_token)
{
$this->notification_token = $notification_token;
}
/**
* @return mixed
*/
public function getAddress()
{
return $this->address;
}
/**
* @param mixed $address
*/
public function setAddress($address)
{
$this->address = $address;
}
/**
* @return mixed
*/
public function getCountry()
{
return $this->country;
}
/**
* @param mixed $country
*/
public function setCountry($country)
{
$this->country = $country;
}
/**
* @return mixed
*/
public function getCity()
{
return $this->city;
}
/**
* @param mixed $city
*/
public function setCity($city)
{
$this->city = $city;
}
/**
* @return mixed
*/
public function getState()
{
return $this->state;
}
/**
* @param mixed $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return mixed
*/
public function getCounty()
{
return $this->county;
}
/**
* @param mixed $county
*/
public function setCounty($county)
{
$this->county = $county;
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
'notification_token' => $this->notification_token,
'address' => $this->address,
'city' => $this->city,
'country' => $this->country,
'county' => $this->county,
'state' => $this->state
);
}
/**
* @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));
}
}