Passed
Push — master ( 92daf4...591509 )
by
unknown
02:27
created

Hook::setEventType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Created by Graham Owens ([email protected])
4
 * Company: PartFire Ltd (www.partfire.co.uk)
5
 * Console: Discovery
6
 *
7
 * User:    gra
8
 * Date:    20/01/17
9
 * Time:    09:13
10
 * Project: PartFire MangoPay Bundle
11
 * File:    Hook.php
12
 *
13
 **/
14
15
namespace PartFire\MangoPayBundle\Entity;
16
17
use Doctrine\ORM\Mapping as ORM;
18
use Doctrine\ORM\Mapping\MappedSuperclass;
19
use Gedmo\Mapping\Annotation as Gedmo;
20
use Doctrine\Common\Collections\ArrayCollection;
21
use JMS\Serializer\Annotation\ExclusionPolicy;
22
use JMS\Serializer\Annotation\Expose;
23
use PartFire\CommonBundle\Entity\CommonBaseEntity;
24
use PartFire\MangoPayBundle\MangoPayConstants;
25
26
27
/**
28
 * @ORM\Entity
29
 * @ORM\Table(name="partfire_mango_hook", indexes={
30
 *  @ORM\Index(name="index_enabled", columns={"enabled", "deleted", "status"}) })
31
 * @ORM\Entity(repositoryClass="PartFire\MangoPayBundle\Entity\Repository\HookRepository")
32
 * @ExclusionPolicy("all")
33
 */
34
35
class Hook extends CommonBaseEntity
36
{
37
    /**
38
     * @ORM\Column(name="resource_id",type="string", length=255, nullable=false);
39
     *
40
     */
41
42
    private $resourceId;
43
44
    /**
45
     * @ORM\Column(name="date",type="string", length=255, nullable=false);
46
     *
47
     */
48
49
    private $date;
50
51
52
    /**
53
     * @ORM\Column(name="event_type",type="string", length=255, nullable=false);
54
     *
55
     */
56
57
    private $eventType;
58
59
    /**
60
     * @ORM\Column(name="raw_hook_data",type="string", length=500, nullable=false);
61
     *
62
     */
63
64
    private $rawHookData;
65
66
    /**
67
     * @var string
68
     *
69
     * @ORM\Column(name="status", type="string", length=200, nullable=false)
70
     */
71
    protected $status;
72
73
    public function __construct()
74
    {
75
        parent::__construct();
76
        $this->status = MangoPayConstants::HOOK_NEW;
77
    }
78
79
    /**
80
     * @return mixed
81
     */
82
    public function getResourceId()
83
    {
84
        return $this->resourceId;
85
    }
86
87
    /**
88
     * @param mixed $resourceId
89
     */
90
    public function setResourceId($resourceId)
91
    {
92
        $this->resourceId = $resourceId;
93
    }
94
95
    /**
96
     * @return mixed
97
     */
98
    public function getDate()
99
    {
100
        return $this->date;
101
    }
102
103
    /**
104
     * @param mixed $date
105
     */
106
    public function setDate($date)
107
    {
108
        $this->date = $date;
109
    }
110
111
    /**
112
     * @return mixed
113
     */
114
    public function getEventType()
115
    {
116
        return $this->eventType;
117
    }
118
119
    /**
120
     * @param mixed $eventType
121
     */
122
    public function setEventType($eventType)
123
    {
124
        $this->eventType = $eventType;
125
    }
126
127
    /**
128
     * @return mixed
129
     */
130
    public function getRawHookData()
131
    {
132
        return $this->rawHookData;
133
    }
134
135
    /**
136
     * @param mixed $rawHookData
137
     */
138
    public function setRawHookData($rawHookData)
139
    {
140
        $this->rawHookData = $rawHookData;
141
    }
142
143
    /**
144
     * @return string
145
     */
146
    public function getStatus(): string
147
    {
148
        return $this->status;
149
    }
150
151
    /**
152
     * @param string $status
153
     */
154
    public function setStatus(string $status)
155
    {
156
        $this->status = $status;
157
    }
158
159
160
}