From 9447f643126c2ee5aba0ca254fa569f0b856931d Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 19 Dec 2023 17:30:38 +0800 Subject: [PATCH] Create item price, price tier, and item type entities for regional pricing. #780 --- src/Entity/ItemPrice.php | 53 +++++++++++++++++++++++++++++ src/Entity/ItemType.php | 69 +++++++++++++++++++++++++++++++++++++ src/Entity/PriceTier.php | 73 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 195 insertions(+) create mode 100644 src/Entity/ItemPrice.php create mode 100644 src/Entity/ItemType.php create mode 100644 src/Entity/PriceTier.php diff --git a/src/Entity/ItemPrice.php b/src/Entity/ItemPrice.php new file mode 100644 index 00000000..d03cadbf --- /dev/null +++ b/src/Entity/ItemPrice.php @@ -0,0 +1,53 @@ +id; + } +} diff --git a/src/Entity/ItemType.php b/src/Entity/ItemType.php new file mode 100644 index 00000000..204fb9b3 --- /dev/null +++ b/src/Entity/ItemType.php @@ -0,0 +1,69 @@ +code = ''; + } + + public function getID() + { + return $this->id; + } + + public function setName($name) + { + $this->name = $name; + return $this; + } + + public function getName() + { + return $this->name; + } + + public function setCode($code) + { + $this->code = $code; + return $this; + } + + public function getCode() + { + return $this->code; + } +} diff --git a/src/Entity/PriceTier.php b/src/Entity/PriceTier.php new file mode 100644 index 00000000..18b735aa --- /dev/null +++ b/src/Entity/PriceTier.php @@ -0,0 +1,73 @@ +meta_areas = []; + + $this->items = new ArrayCollection(); + } + + public function getID() + { + return $this->id; + } + + public function setName($name) + { + $this->name = $name; + return $this; + } + + public function getName() + { + return $this->name; + } + + public function addMetaArea($id, $value) + { + $this->meta_areas[$id] = $value; + } + + public function getAllMetaAreas() + { + return $this->meta_areas; + } +}