nkt/doctrine-columns

快速编写代码实体

0.1.1 2014-03-25 22:08 UTC

This package is auto-updated.

Last update: 2024-09-04 12:41:55 UTC


README

为什么?

因为停止复制粘贴代码。重用它们!

如何?

只需使用所需的列特质。

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);
    }
}

我如何帮助?

添加您流行的列并摆脱复制粘贴!

许可证

MIT