| @@ 20-81 (lines=62) @@ | ||
| 17 | /** |
|
| 18 | * Custom Field Model. |
|
| 19 | */ |
|
| 20 | class CustomFieldModel implements ResourceModelInterface |
|
| 21 | { |
|
| 22 | /** |
|
| 23 | * Custom Field ID. |
|
| 24 | * |
|
| 25 | * @SA\Type("string") |
|
| 26 | * @SA\SerializedName("id") |
|
| 27 | * |
|
| 28 | * @var string|null |
|
| 29 | */ |
|
| 30 | protected $id; |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Custom field value. |
|
| 34 | * |
|
| 35 | * @SA\Type("string") |
|
| 36 | * @SA\SerializedName("value") |
|
| 37 | * |
|
| 38 | * @var string|null |
|
| 39 | */ |
|
| 40 | protected $value; |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @return null|string |
|
| 44 | */ |
|
| 45 | public function getId() |
|
| 46 | { |
|
| 47 | return $this->id; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * @param null|string $id |
|
| 52 | * |
|
| 53 | * @return $this |
|
| 54 | */ |
|
| 55 | public function setId($id) |
|
| 56 | { |
|
| 57 | $this->id = $id; |
|
| 58 | ||
| 59 | return $this; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @return null|string |
|
| 64 | */ |
|
| 65 | public function getValue() |
|
| 66 | { |
|
| 67 | return $this->value; |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * @param null|string $value |
|
| 72 | * |
|
| 73 | * @return $this |
|
| 74 | */ |
|
| 75 | public function setValue($value) |
|
| 76 | { |
|
| 77 | $this->value = $value; |
|
| 78 | ||
| 79 | return $this; |
|
| 80 | } |
|
| 81 | } |
|
| 82 | ||
| @@ 20-82 (lines=63) @@ | ||
| 17 | /** |
|
| 18 | * Metadata Model. |
|
| 19 | */ |
|
| 20 | class MetadataModel implements ResourceModelInterface |
|
| 21 | { |
|
| 22 | /** |
|
| 23 | * Key should be less than 50 symbols and match following regular expression ([A-Za-z0-9_-]+). |
|
| 24 | * |
|
| 25 | * @SA\Type("string") |
|
| 26 | * @SA\SerializedName("key") |
|
| 27 | * |
|
| 28 | * @var string|null |
|
| 29 | */ |
|
| 30 | protected $key; |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Value should be less than 1000 symbols, compatible with JSON string. |
|
| 34 | * Use JSON 'null' in order to remove metadata entry. |
|
| 35 | * |
|
| 36 | * @SA\Type("string") |
|
| 37 | * @SA\SerializedName("value") |
|
| 38 | * |
|
| 39 | * @var string|null |
|
| 40 | */ |
|
| 41 | protected $value; |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @return null|string |
|
| 45 | */ |
|
| 46 | public function getKey() |
|
| 47 | { |
|
| 48 | return $this->key; |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @param null|string $key |
|
| 53 | * |
|
| 54 | * @return $this |
|
| 55 | */ |
|
| 56 | public function setKey($key) |
|
| 57 | { |
|
| 58 | $this->key = $key; |
|
| 59 | ||
| 60 | return $this; |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * @return null|string |
|
| 65 | */ |
|
| 66 | public function getValue() |
|
| 67 | { |
|
| 68 | return $this->value; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * @param null|string $value |
|
| 73 | * |
|
| 74 | * @return $this |
|
| 75 | */ |
|
| 76 | public function setValue($value) |
|
| 77 | { |
|
| 78 | $this->value = $value; |
|
| 79 | ||
| 80 | return $this; |
|
| 81 | } |
|
| 82 | } |
|
| 83 | ||