-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathWebhookRequest.php
More file actions
70 lines (57 loc) · 1.6 KB
/
Copy pathWebhookRequest.php
File metadata and controls
70 lines (57 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
declare(strict_types=1);
namespace PHPCensor\Model\Base;
use PHPCensor\Model;
use PHPCensor\Traits\Model\HasCreateDateTrait;
/**
* @package PHP Censor
* @subpackage Application
*
* @author Dmitry Khomutov <poisoncorpsee@gmail.com>
*/
class WebhookRequest extends Model
{
use HasCreateDateTrait;
public const WEBHOOK_TYPE_GIT = 'git';
public const WEBHOOK_TYPE_GITHUB = 'github';
public const WEBHOOK_TYPE_BITBUCKET = 'bitbucket';
public const WEBHOOK_TYPE_GITLAB = 'gitlab';
public const WEBHOOK_TYPE_GOGS = 'gogs';
public const WEBHOOK_TYPE_HG = 'hg';
public const WEBHOOK_TYPE_SVN = 'svn';
protected array $data = [
'id' => null,
'project_id' => null,
'webhook_type' => null,
'payload' => null,
'create_date' => null,
];
protected array $dataTypes = [
'project_id' => 'integer',
'create_date' => 'datetime',
];
public function getProjectId(): ?int
{
return $this->getDataItem('project_id');
}
public function setProjectId(int $value): bool
{
return $this->setDataItem('project_id', $value);
}
public function getWebhookType(): ?string
{
return $this->getDataItem('webhook_type');
}
public function setWebhookType(string $value): bool
{
return $this->setDataItem('webhook_type', $value);
}
public function getPayload(): ?string
{
return $this->getDataItem('payload');
}
public function setPayload(?string $value): bool
{
return $this->setDataItem('payload', $value);
}
}