Last active
December 8, 2018 12:45
-
-
Save tatma/b4fee1fcb7534de336f42021e2e9ce07 to your computer and use it in GitHub Desktop.
Basic Entity (properties, no methods)
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment