diff --git a/Docs/Dev/img/er.png b/Docs/Dev/img/er.png new file mode 100644 index 0000000..cf2979b Binary files /dev/null and b/Docs/Dev/img/er.png differ diff --git a/Models/AttributeValueType.php b/Models/AttributeValueType.php index df2d3a3..7dfc076 100755 --- a/Models/AttributeValueType.php +++ b/Models/AttributeValueType.php @@ -26,11 +26,11 @@ use phpOMS\Stdlib\Base\Enum; */ abstract class AttributeValueType extends Enum { - public const _INT = 0; + public const _INT = 1; - public const _STRING = 1; + public const _STRING = 2; - public const _FLOAT = 2; + public const _FLOAT = 3; - public const _DATETIME = 3; + public const _DATETIME = 4; } diff --git a/Models/Item.php b/Models/Item.php index 0ada2f2..f7d339c 100755 --- a/Models/Item.php +++ b/Models/Item.php @@ -200,7 +200,33 @@ class Item } /** - * Add doc to item + * Add attribute to item + * + * @param ItemAttribute $attribute Note + * + * @return void + * + * @since 1.0.0 + */ + public function addAttribute(ItemAttribute $attribute) : void + { + $this->attributes[] = $attribute; + } + + /** + * Get attributes + * + * @return ItemAttribute[] + * + * @since 1.0.0 + */ + public function getAttributes() : array + { + return $this->attributes; + } + + /** + * Add note to item * * @param EditorDoc $note Note *