|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
*/ |
|
4
|
|
|
|
|
5
|
|
|
namespace Commercetools\Core\Model\Extension; |
|
6
|
|
|
|
|
7
|
|
|
use Commercetools\Core\Model\Common\DateTimeDecorator; |
|
8
|
|
|
use Commercetools\Core\Model\Common\Resource; |
|
9
|
|
|
use DateTime; |
|
10
|
|
|
|
|
11
|
|
|
/** |
|
12
|
|
|
* @package Commercetools\Core\Model\Extension |
|
13
|
|
|
* |
|
14
|
|
|
* @method string getId() |
|
15
|
|
|
* @method Extension setId(string $id = null) |
|
16
|
|
|
* @method int getVersion() |
|
17
|
|
|
* @method Extension setVersion(int $version = null) |
|
18
|
|
|
* @method DateTimeDecorator getCreatedAt() |
|
19
|
|
|
* @method Extension setCreatedAt(DateTime $createdAt = null) |
|
20
|
|
|
* @method DateTimeDecorator getLastModifiedAt() |
|
21
|
|
|
* @method Extension setLastModifiedAt(DateTime $lastModifiedAt = null) |
|
22
|
|
|
* @method string getKey() |
|
23
|
|
|
* @method Extension setKey(string $key = null) |
|
24
|
|
|
* @method Destination getDestination() |
|
25
|
|
|
* @method Extension setDestination(Destination $destination = null) |
|
26
|
|
|
* @method TriggerCollection getTriggers() |
|
27
|
|
|
* @method Extension setTriggers(TriggerCollection $triggers = null) |
|
28
|
|
|
*/ |
|
29
|
|
|
class Extension extends Resource |
|
30
|
|
|
{ |
|
31
|
5 |
|
public function fieldDefinitions() |
|
32
|
|
|
{ |
|
33
|
|
|
return [ |
|
34
|
5 |
|
'id' => [static::TYPE => 'string'], |
|
35
|
5 |
|
'version' => [static::TYPE => 'int'], |
|
36
|
|
|
'createdAt' => [ |
|
37
|
5 |
|
static::TYPE => DateTime::class, |
|
38
|
5 |
|
static::DECORATOR => DateTimeDecorator::class |
|
39
|
|
|
], |
|
40
|
|
|
'lastModifiedAt' => [ |
|
41
|
5 |
|
static::TYPE => DateTime::class, |
|
42
|
5 |
|
static::DECORATOR => DateTimeDecorator::class |
|
43
|
|
|
], |
|
44
|
5 |
|
'key' => [static::TYPE => 'string'], |
|
45
|
5 |
|
'destination' => [static::TYPE => Destination::class], |
|
46
|
5 |
|
'triggers' => [static::TYPE => TriggerCollection::class], |
|
47
|
|
|
]; |
|
48
|
|
|
} |
|
49
|
|
|
} |
|
50
|
|
|
|