From b92625642dbd3e71f1ca5a576912bdc70276891b Mon Sep 17 00:00:00 2001 From: "Israel J. Carberry" Date: Mon, 15 Jun 2020 20:52:07 -0500 Subject: [PATCH] #1 Added UUID property and getter to other entity models --- src/Entity/Assistance.php | 11 +++++++++++ src/Entity/AssistanceItem.php | 11 +++++++++++ src/Entity/Household.php | 11 +++++++++++ src/Entity/PantryItem.php | 11 +++++++++++ src/Entity/ServiceAssistance.php | 11 +++++++++++ src/Entity/ServiceAssistanceItem.php | 11 +++++++++++ src/Entity/ServiceAssistanceStatus.php | 11 +++++++++++ src/Entity/ServicePantry.php | 11 +++++++++++ src/Entity/ServicePantryItem.php | 11 +++++++++++ src/Entity/ServicePantryStatus.php | 11 +++++++++++ 10 files changed, 110 insertions(+) diff --git a/src/Entity/Assistance.php b/src/Entity/Assistance.php index ec906bb..b4a66c1 100644 --- a/src/Entity/Assistance.php +++ b/src/Entity/Assistance.php @@ -30,6 +30,12 @@ class Assistance */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="datetimetz") */ @@ -135,6 +141,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getEnabled(): ?\DateTimeInterface { return $this->enabled; diff --git a/src/Entity/AssistanceItem.php b/src/Entity/AssistanceItem.php index 9a98d20..3addf79 100644 --- a/src/Entity/AssistanceItem.php +++ b/src/Entity/AssistanceItem.php @@ -16,6 +16,12 @@ class AssistanceItem */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="bigint", nullable=true) */ @@ -41,6 +47,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getBarcode(): ?string { return $this->barcode; diff --git a/src/Entity/Household.php b/src/Entity/Household.php index 9109881..6c6ce7d 100644 --- a/src/Entity/Household.php +++ b/src/Entity/Household.php @@ -23,6 +23,12 @@ class Household implements RecipientInterface */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="datetimetz") */ @@ -109,6 +115,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getCreated(): ?\DateTimeInterface { return $this->created; diff --git a/src/Entity/PantryItem.php b/src/Entity/PantryItem.php index 19ad8b7..765076c 100644 --- a/src/Entity/PantryItem.php +++ b/src/Entity/PantryItem.php @@ -28,6 +28,12 @@ class PantryItem */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="bigint", nullable=true) */ @@ -93,6 +99,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getBarcode(): ?string { return $this->barcode; diff --git a/src/Entity/ServiceAssistance.php b/src/Entity/ServiceAssistance.php index c6a9ae7..f456e68 100644 --- a/src/Entity/ServiceAssistance.php +++ b/src/Entity/ServiceAssistance.php @@ -18,6 +18,12 @@ class ServiceAssistance */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="datetimetz") */ @@ -76,6 +82,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getCreated(): ?\DateTimeInterface { return $this->created; diff --git a/src/Entity/ServiceAssistanceItem.php b/src/Entity/ServiceAssistanceItem.php index 078ad82..7b7a47f 100644 --- a/src/Entity/ServiceAssistanceItem.php +++ b/src/Entity/ServiceAssistanceItem.php @@ -16,6 +16,12 @@ class ServiceAssistanceItem */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="integer") */ @@ -43,6 +49,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getDollarsInCents(): ?int { return $this->dollarsInCents; diff --git a/src/Entity/ServiceAssistanceStatus.php b/src/Entity/ServiceAssistanceStatus.php index 7d88d45..0aa4956 100644 --- a/src/Entity/ServiceAssistanceStatus.php +++ b/src/Entity/ServiceAssistanceStatus.php @@ -29,6 +29,12 @@ class ServiceAssistanceStatus */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="datetimetz") */ @@ -82,6 +88,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getCreated(): ?\DateTimeInterface { return $this->created; diff --git a/src/Entity/ServicePantry.php b/src/Entity/ServicePantry.php index 0a6a40f..17c2b34 100644 --- a/src/Entity/ServicePantry.php +++ b/src/Entity/ServicePantry.php @@ -18,6 +18,12 @@ class ServicePantry */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="datetimetz") */ @@ -86,6 +92,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getCreated(): ?\DateTimeInterface { return $this->created; diff --git a/src/Entity/ServicePantryItem.php b/src/Entity/ServicePantryItem.php index 70ac5f0..e34946d 100644 --- a/src/Entity/ServicePantryItem.php +++ b/src/Entity/ServicePantryItem.php @@ -16,6 +16,12 @@ class ServicePantryItem */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="integer") */ @@ -38,6 +44,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getQty(): ?int { return $this->qty; diff --git a/src/Entity/ServicePantryStatus.php b/src/Entity/ServicePantryStatus.php index a42844b..6cbdc43 100644 --- a/src/Entity/ServicePantryStatus.php +++ b/src/Entity/ServicePantryStatus.php @@ -29,6 +29,12 @@ class ServicePantryStatus */ private $id; + /** + * @ORM\GeneratedValue(strategy="UUID") + * @ORM\Column(type="guid") + */ + private $uuid; + /** * @ORM\Column(type="datetimetz") */ @@ -82,6 +88,11 @@ public function getId(): ?int return $this->id; } + public function getUuid(): ?string + { + return $this->uuid; + } + public function getCreated(): ?\DateTimeInterface { return $this->created;