Article with getters and setters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Article | |
* | |
* @ORM\Table(name="articles") | |
* @ORM\Entity | |
*/ | |
class Article | |
{ | |
/** | |
* @ORM\Id | |
* @ORM\Column(name="id", type="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
private $id; | |
/** | |
* @var String | |
* | |
* @ORM\Column(name="title", type="string", length=255) | |
*/ | |
private $title; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="slug", type="string", length=100, unique=true) | |
*/ | |
private $slug; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="content", type="text") | |
*/ | |
private $content; | |
/** | |
* @var datetime | |
* | |
* @ORM\Column(name="creation_datetime", type="datetime", nullable=false) | |
*/ | |
private $creationDateTime; | |
/** | |
* @var datetime | |
* | |
* @ORM\Column(name="last_modification_datetime", type="datetime", nullable=true) | |
*/ | |
private $lastModificationDateTime; | |
public function getId() | |
{ | |
return $this->id; | |
} | |
public function setTitle($title) | |
{ | |
$this->title = $title; | |
} | |
public function getTitle() | |
{ | |
return $this->title; | |
} | |
public function setSlug($slug) | |
{ | |
$this->slug = $slug; | |
} | |
public function getSlug() | |
{ | |
return $this->slug; | |
} | |
public function setContent($content) | |
{ | |
$this->content = $content; | |
} | |
public function getContent() | |
{ | |
return $this->content; | |
} | |
public function setCreationDateTime($creationDateTime) | |
{ | |
$this->creationDateTime = $creationDateTime; | |
} | |
public function getCreationDateTime() | |
{ | |
return $this->creationDateTime; | |
} | |
public function setLastModificationDateTime($lastModificationDateTime) | |
{ | |
$this->lastModificationDateTime = $lastModificationDateTime; | |
} | |
public function getLastModificationDateTime() | |
{ | |
return $this->lastModificationDateTime; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment