diff --git a/lib/Dto/CreatePropertyRequest.php b/lib/Dto/CreatePropertyRequest.php index a0e73161d9d2e7ddb36f514a9a0b38ce03947b81..b545ffb43dc864a618709bb5a9f0e868c2acd76e 100644 --- a/lib/Dto/CreatePropertyRequest.php +++ b/lib/Dto/CreatePropertyRequest.php @@ -69,7 +69,8 @@ class CreatePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => 'bool', 'is_required' => 'bool', 'has_directory' => 'bool', - 'is_moderated' => 'bool' + 'is_moderated' => 'bool', + 'sort' => 'integer', ]; /** @@ -90,7 +91,8 @@ class CreatePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => null, 'is_required' => null, 'has_directory' => null, - 'is_moderated' => null + 'is_moderated' => null, + 'sort' => null, ]; /** @@ -111,7 +113,8 @@ class CreatePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => false, 'is_required' => false, 'has_directory' => false, - 'is_moderated' => false + 'is_moderated' => false, + 'sort' => true, ]; /** @@ -213,7 +216,8 @@ class CreatePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => 'is_active', 'is_required' => 'is_required', 'has_directory' => 'has_directory', - 'is_moderated' => 'is_moderated' + 'is_moderated' => 'is_moderated', + 'sort' => 'sort', ]; /** @@ -234,7 +238,8 @@ class CreatePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => 'setIsActive', 'is_required' => 'setIsRequired', 'has_directory' => 'setHasDirectory', - 'is_moderated' => 'setIsModerated' + 'is_moderated' => 'setIsModerated', + 'sort' => 'setSort', ]; /** @@ -255,7 +260,8 @@ class CreatePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => 'getIsActive', 'is_required' => 'getIsRequired', 'has_directory' => 'getHasDirectory', - 'is_moderated' => 'getIsModerated' + 'is_moderated' => 'getIsModerated', + 'sort' => 'getSort', ]; /** @@ -331,6 +337,7 @@ class CreatePropertyRequest implements ModelInterface, ArrayAccess $this->setIfExists('is_required', $data, null); $this->setIfExists('has_directory', $data, null); $this->setIfExists('is_moderated', $data, null); + $this->setIfExists('sort', $data, 500); } public function setIfExists(string $variableName, $fields, $defaultValue) @@ -367,6 +374,29 @@ class CreatePropertyRequest implements ModelInterface, ArrayAccess return count($this->listInvalidProperties()) === 0; } + /** + * Gets sort + * + * @return int|null + */ + public function getSort() + { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param int $sort Значение сортировки + * + * @return $this + */ + public function setSort(int $sort) + { + $this->container['sort'] = $sort; + + return $this; + } /** * Gets name diff --git a/lib/Dto/Property.php b/lib/Dto/Property.php index 41bff00bea342ff07598cb7c5a88d4561903141b..f13b56fa0866c6f37694add753094ebd3e6fd3fc 100644 --- a/lib/Dto/Property.php +++ b/lib/Dto/Property.php @@ -75,6 +75,7 @@ class Property implements ModelInterface, ArrayAccess 'is_required' => 'bool', 'has_directory' => 'bool', 'is_moderated' => 'bool', + 'sort' => 'integer', 'directory' => '\Ensi\PimClient\Dto\AttributeDirectoryValue[]' ]; @@ -102,6 +103,7 @@ class Property implements ModelInterface, ArrayAccess 'is_required' => null, 'has_directory' => null, 'is_moderated' => null, + 'sort' => null, 'directory' => null ]; @@ -129,7 +131,8 @@ class Property implements ModelInterface, ArrayAccess 'is_required' => false, 'has_directory' => false, 'is_moderated' => false, - 'directory' => false + 'directory' => false, + 'sort' => true, ]; /** @@ -159,7 +162,7 @@ class Property implements ModelInterface, ArrayAccess return self::$openAPIFormats; } - /** + /** * Array of property to nullable mappings. Used for (de)serialization * * @return array @@ -237,7 +240,8 @@ class Property implements ModelInterface, ArrayAccess 'is_required' => 'is_required', 'has_directory' => 'has_directory', 'is_moderated' => 'is_moderated', - 'directory' => 'directory' + 'directory' => 'directory', + 'sort' => 'sort', ]; /** @@ -264,7 +268,8 @@ class Property implements ModelInterface, ArrayAccess 'is_required' => 'setIsRequired', 'has_directory' => 'setHasDirectory', 'is_moderated' => 'setIsModerated', - 'directory' => 'setDirectory' + 'directory' => 'setDirectory', + 'sort' => 'setSort', ]; /** @@ -291,7 +296,8 @@ class Property implements ModelInterface, ArrayAccess 'is_required' => 'getIsRequired', 'has_directory' => 'getHasDirectory', 'is_moderated' => 'getIsModerated', - 'directory' => 'getDirectory' + 'directory' => 'getDirectory', + 'sort' => 'getSort', ]; /** @@ -335,9 +341,9 @@ class Property implements ModelInterface, ArrayAccess return self::$openAPIModelName; } - - + + /** * Associative array for storing property values @@ -373,6 +379,7 @@ class Property implements ModelInterface, ArrayAccess $this->setIfExists('has_directory', $data, null); $this->setIfExists('is_moderated', $data, null); $this->setIfExists('directory', $data, null); + $this->setIfExists('sort', $data, 500); } public function setIfExists(string $variableName, $fields, $defaultValue) @@ -409,6 +416,30 @@ class Property implements ModelInterface, ArrayAccess return count($this->listInvalidProperties()) === 0; } + /** + * Gets sort + * + * @return int|null + */ + public function getSort() + { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param int $sort Значение сортировки + * + * @return $this + */ + public function setSort(int $sort) + { + $this->container['sort'] = $sort; + + return $this; + } + /** * Gets id diff --git a/lib/Dto/PropertyFillableProperties.php b/lib/Dto/PropertyFillableProperties.php index d0d8176aa86eb4ed086def3505af5ad6381d90ed..0f253964cd6e4c8f6c7dc00e78c85a34f5d77323 100644 --- a/lib/Dto/PropertyFillableProperties.php +++ b/lib/Dto/PropertyFillableProperties.php @@ -69,7 +69,8 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess 'is_active' => 'bool', 'is_required' => 'bool', 'has_directory' => 'bool', - 'is_moderated' => 'bool' + 'is_moderated' => 'bool', + 'sort' => 'integer', ]; /** @@ -90,7 +91,8 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess 'is_active' => null, 'is_required' => null, 'has_directory' => null, - 'is_moderated' => null + 'is_moderated' => null, + 'sort' => null, ]; /** @@ -111,7 +113,8 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess 'is_active' => false, 'is_required' => false, 'has_directory' => false, - 'is_moderated' => false + 'is_moderated' => false, + 'sort' => true, ]; /** @@ -141,7 +144,7 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess return self::$openAPIFormats; } - /** + /** * Array of property to nullable mappings. Used for (de)serialization * * @return array @@ -213,7 +216,8 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess 'is_active' => 'is_active', 'is_required' => 'is_required', 'has_directory' => 'has_directory', - 'is_moderated' => 'is_moderated' + 'is_moderated' => 'is_moderated', + 'sort' => 'sort' ]; /** @@ -234,7 +238,8 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess 'is_active' => 'setIsActive', 'is_required' => 'setIsRequired', 'has_directory' => 'setHasDirectory', - 'is_moderated' => 'setIsModerated' + 'is_moderated' => 'setIsModerated', + 'sort' => 'setSort', ]; /** @@ -255,7 +260,8 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess 'is_active' => 'getIsActive', 'is_required' => 'getIsRequired', 'has_directory' => 'getHasDirectory', - 'is_moderated' => 'getIsModerated' + 'is_moderated' => 'getIsModerated', + 'sort' => 'getSort', ]; /** @@ -299,9 +305,9 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess return self::$openAPIModelName; } - - + + /** * Associative array for storing property values @@ -331,6 +337,7 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess $this->setIfExists('is_required', $data, null); $this->setIfExists('has_directory', $data, null); $this->setIfExists('is_moderated', $data, null); + $this->setIfExists('sort', $data, 500); } public function setIfExists(string $variableName, $fields, $defaultValue) @@ -367,6 +374,29 @@ class PropertyFillableProperties implements ModelInterface, ArrayAccess return count($this->listInvalidProperties()) === 0; } + /** + * Gets sort + * + * @return int|null + */ + public function getSort() + { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param int $sort Значение сортировки + * + * @return $this + */ + public function setSort(int $sort) + { + $this->container['sort'] = $sort; + + return $this; + } /** * Gets name diff --git a/lib/Dto/ReplacePropertyRequest.php b/lib/Dto/ReplacePropertyRequest.php index 30db77c5807200cb86fb747f11797c1addeaf9bf..877f8039fc49c85f5d2b78aa5c00de4a974a89e5 100644 --- a/lib/Dto/ReplacePropertyRequest.php +++ b/lib/Dto/ReplacePropertyRequest.php @@ -69,7 +69,8 @@ class ReplacePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => 'bool', 'is_required' => 'bool', 'has_directory' => 'bool', - 'is_moderated' => 'bool' + 'is_moderated' => 'bool', + 'sort' => 'integer', ]; /** @@ -90,7 +91,8 @@ class ReplacePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => null, 'is_required' => null, 'has_directory' => null, - 'is_moderated' => null + 'is_moderated' => null, + 'sort' => null, ]; /** @@ -111,7 +113,8 @@ class ReplacePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => false, 'is_required' => false, 'has_directory' => false, - 'is_moderated' => false + 'is_moderated' => false, + 'sort' => true, ]; /** @@ -213,7 +216,8 @@ class ReplacePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => 'is_active', 'is_required' => 'is_required', 'has_directory' => 'has_directory', - 'is_moderated' => 'is_moderated' + 'is_moderated' => 'is_moderated', + 'sort' => 'sort' ]; /** @@ -234,7 +238,8 @@ class ReplacePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => 'setIsActive', 'is_required' => 'setIsRequired', 'has_directory' => 'setHasDirectory', - 'is_moderated' => 'setIsModerated' + 'is_moderated' => 'setIsModerated', + 'sort' => 'setSort', ]; /** @@ -255,7 +260,8 @@ class ReplacePropertyRequest implements ModelInterface, ArrayAccess 'is_active' => 'getIsActive', 'is_required' => 'getIsRequired', 'has_directory' => 'getHasDirectory', - 'is_moderated' => 'getIsModerated' + 'is_moderated' => 'getIsModerated', + 'sort' => 'getSort', ]; /** @@ -331,6 +337,7 @@ class ReplacePropertyRequest implements ModelInterface, ArrayAccess $this->setIfExists('is_required', $data, null); $this->setIfExists('has_directory', $data, null); $this->setIfExists('is_moderated', $data, null); + $this->setIfExists('sort', $data, 500); } public function setIfExists(string $variableName, $fields, $defaultValue) @@ -367,6 +374,30 @@ class ReplacePropertyRequest implements ModelInterface, ArrayAccess return count($this->listInvalidProperties()) === 0; } + /** + * Gets sort + * + * @return int|null + */ + public function getSort() + { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param int $sort Значение сортировки + * + * @return $this + */ + public function setSort(int $sort) + { + $this->container['sort'] = $sort; + + return $this; + } + /** * Gets name