Skip to content

Instantly share code, notes, and snippets.

@andreybolonin
Last active September 9, 2020 13:15
Show Gist options
  • Save andreybolonin/2cf6342a3c4dc15b4153880fcb9babb3 to your computer and use it in GitHub Desktop.
Save andreybolonin/2cf6342a3c4dc15b4153880fcb9babb3 to your computer and use it in GitHub Desktop.
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class NamespaceSymfony
{
/**
* @ORM\Id()
* @ORM\GeneratedValue(strategy="IDENTITY")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $name;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $url;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* NamespaceSymfony constructor.
*/
public function __construct()
{
$this->createdAt = new \DateTime();
}
public function getId()
{
return $this->id;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getUrl()
{
return $this->url;
}
/**
* @param string $url
*/
public function setUrl(string $url)
{
$this->url = $url;
}
/**
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param \DateTime $createdAt
*/
public function setCreatedAt(\DateTime $createdAt): void
{
$this->createdAt = $createdAt;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment