. */ namespace Volkszaehler\Model; use Volkszaehler\Util; /** * Entity superclass for all models with database persistance * * @author Steffen Vogel * @package default * * @MappedSuperclass */ abstract class Entity { /** * @Id * @Column(type="integer", nullable=false) * @GeneratedValue(strategy="AUTO") */ protected $id; /** @Column(type="string", length=36, nullable=false) */ protected $uuid; public function __construct() { $this->uuid = Util\UUID::mint(); } /** * Getter & setter */ public function getId() { return $this->id; } // read only public function getUuid() { return $this->uuid; } // read only } ?>