Because stop copy-paste code. Reuse it!
Just use column-trait, that you need.
use Nkt\Column;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="books")
*/
class Book
{
use Column\Id;
use Column\Name;
use Column\Description;
use Column\Price;
public function __construct($name, $description)
{
$this->setName($name);
$this->setDescription($description);
}
}
Add your popular column and get rid of copy-paste!