. */ 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") * @GeneratedValue(strategy="AUTO") */ protected $id; /** @Column(type="string", length=36) */ 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 } ?>