1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace SmartboxSkeletonBundle\Entity; |
4
|
|
|
|
5
|
|
|
use Smartbox\CoreBundle\Type\SerializableInterface; |
6
|
|
|
use Smartbox\CoreBundle\Type\Entity; |
7
|
|
|
use JMS\Serializer\Annotation as JMS; |
8
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
9
|
|
|
|
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* Class Result |
13
|
|
|
* @package SmartboxSkeletonBundle\Entity |
14
|
|
|
*/ |
15
|
|
|
class Result extends Entity implements SerializableInterface |
16
|
|
|
{ |
17
|
|
|
/** |
18
|
|
|
* @Assert\Type(type="string") |
19
|
|
|
* @Assert\NotBlank |
20
|
|
|
* @Assert\Length(min="1") |
21
|
|
|
* @JMS\Type("string") |
22
|
|
|
* @JMS\Expose |
23
|
|
|
* @JMS\Groups({"list", "public", "logs"}) |
24
|
|
|
* @JMS\SerializedName("transactionId") |
25
|
|
|
* |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
protected $transactionId; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @Assert\Type(type="\DateTime") |
32
|
|
|
* @Assert\NotBlank |
33
|
|
|
* @JMS\Type("DateTime") |
34
|
|
|
* @JMS\Expose |
35
|
|
|
* @JMS\Groups({"list", "public", "logs"}) |
36
|
|
|
* @JMS\SerializedName("timestamp") |
37
|
|
|
* |
38
|
|
|
* @var \DateTime |
39
|
|
|
*/ |
40
|
|
|
protected $timestamp; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @Assert\Type(type="integer") |
44
|
|
|
* @JMS\Type("integer") |
45
|
|
|
* @JMS\Expose |
46
|
|
|
* @JMS\Groups({"list", "public", "logs"}) |
47
|
|
|
* @JMS\SerializedName("code") |
48
|
|
|
* |
49
|
|
|
* @var int |
50
|
|
|
*/ |
51
|
|
|
protected $code; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @Assert\Type(type="string") |
55
|
|
|
* @JMS\Type("string") |
56
|
|
|
* @JMS\Expose |
57
|
|
|
* @JMS\Groups({"list", "public", "logs"}) |
58
|
|
|
* @JMS\SerializedName("message") |
59
|
|
|
* |
60
|
|
|
* @var string |
61
|
|
|
*/ |
62
|
|
|
protected $message; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @return mixed |
66
|
|
|
*/ |
67
|
|
|
public function getTransactionId() |
68
|
|
|
{ |
69
|
|
|
return $this->transactionId; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @param mixed $transactionId |
74
|
|
|
* |
75
|
|
|
* @return $this |
76
|
|
|
*/ |
77
|
|
|
public function setTransactionId($transactionId) |
78
|
|
|
{ |
79
|
|
|
$this->transactionId = $transactionId; |
80
|
|
|
|
81
|
|
|
return $this; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @return mixed |
86
|
|
|
*/ |
87
|
|
|
public function getTimestamp() |
88
|
|
|
{ |
89
|
|
|
return $this->timestamp; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @param mixed $timestamp |
94
|
|
|
* |
95
|
|
|
* @return $this |
96
|
|
|
*/ |
97
|
|
|
public function setTimestamp($timestamp) |
98
|
|
|
{ |
99
|
|
|
$this->timestamp = $timestamp; |
100
|
|
|
|
101
|
|
|
return $this; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @return int |
106
|
|
|
*/ |
107
|
|
|
public function getCode() |
108
|
|
|
{ |
109
|
|
|
return $this->code; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @param int $code |
114
|
|
|
* |
115
|
|
|
* @return $this |
116
|
|
|
*/ |
117
|
|
|
public function setCode($code) |
118
|
|
|
{ |
119
|
|
|
$this->code = $code; |
120
|
|
|
|
121
|
|
|
return $this; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @return mixed |
126
|
|
|
*/ |
127
|
|
|
public function getMessage() |
128
|
|
|
{ |
129
|
|
|
return $this->message; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @param mixed $message |
134
|
|
|
* |
135
|
|
|
* @return $this |
136
|
|
|
*/ |
137
|
|
|
public function setMessage($message) |
138
|
|
|
{ |
139
|
|
|
$this->message = $message; |
140
|
|
|
|
141
|
|
|
return $this; |
142
|
|
|
} |
143
|
|
|
} |
144
|
|
|
|