*/
private $id;
+ /**
+ * @var int
+ *
+ * @ORM\Column(name="uuid", type="text", nullable=true)
+ *
+ * @Groups({"entries_for_user", "export_all"})
+ */
+ private $uuid;
+
/**
* @var string
*
}
$this->updatedAt = new \DateTime();
+
+ $this->generateUuid();
}
/**
{
return $this->language;
}
+
+ /**
+ * @return int
+ */
+ public function getUuid()
+ {
+ return $this->uuid;
+ }
+
+ /**
+ * @param int $uuid
+ *
+ * @return Entry
+ */
+ public function setUuid($uuid)
+ {
+ $this->uuid = $uuid;
+
+ return $this;
+ }
+
+ public function generateUuid()
+ {
+ if (empty($this->uuid) || is_null($this->uuid)) {
+ $this->uuid = uniqid();
+ }
+ }
}