|
1
|
|
|
<?php |
|
2
|
|
|
namespace Tarioch\EveapiFetcherBundle\Entity; |
|
3
|
|
|
|
|
4
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
5
|
|
|
|
|
6
|
|
|
/** |
|
7
|
|
|
* @ORM\Entity |
|
8
|
|
|
* @ORM\Table(name="corpAccountBalance", uniqueConstraints={ |
|
9
|
|
|
* @ORM\UniqueConstraint(name="owner_account", columns={"ownerId", "accountKey"}) |
|
10
|
|
|
* }) |
|
11
|
|
|
*/ |
|
12
|
|
|
class CorpAccountBalance |
|
13
|
|
|
{ |
|
14
|
|
|
/** |
|
15
|
|
|
* @ORM\Id @ORM\Column(name="accountID", type="bigint", options={"unsigned"=true}) |
|
16
|
|
|
*/ |
|
17
|
|
|
private $accountId; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* @ORM\Column(name="ownerID", type="bigint", options={"unsigned"=true}) |
|
21
|
|
|
*/ |
|
22
|
|
|
private $ownerId; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @ORM\Column(name="accountKey", type="bigint", options={"unsigned"=true}) |
|
26
|
|
|
*/ |
|
27
|
|
|
private $accountKey; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @ORM\Column(name="balance", type="decimal", precision=17, scale=2) |
|
31
|
|
|
*/ |
|
32
|
|
|
private $balance; |
|
33
|
|
|
|
|
34
|
|
|
public function __construct($accountId) |
|
35
|
|
|
{ |
|
36
|
|
|
$this->accountId = $accountId; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Get accountId |
|
41
|
|
|
* |
|
42
|
|
|
* @return integer |
|
43
|
|
|
*/ |
|
44
|
|
|
public function getAccountId() |
|
45
|
|
|
{ |
|
46
|
|
|
return $this->accountId; |
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* Set ownerId |
|
51
|
|
|
* |
|
52
|
|
|
* @param integer $ownerId |
|
53
|
|
|
* @return CorpAccountBalance |
|
54
|
|
|
*/ |
|
55
|
|
|
public function setOwnerId($ownerId) |
|
56
|
|
|
{ |
|
57
|
|
|
$this->ownerId = $ownerId; |
|
58
|
|
|
|
|
59
|
|
|
return $this; |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* Get ownerId |
|
64
|
|
|
* |
|
65
|
|
|
* @return integer |
|
66
|
|
|
*/ |
|
67
|
|
|
public function getOwnerId() |
|
68
|
|
|
{ |
|
69
|
|
|
return $this->ownerId; |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* Set accountKey |
|
74
|
|
|
* |
|
75
|
|
|
* @param integer $accountKey |
|
76
|
|
|
* @return CorpAccountBalance |
|
77
|
|
|
*/ |
|
78
|
|
|
public function setAccountKey($accountKey) |
|
79
|
|
|
{ |
|
80
|
|
|
$this->accountKey = $accountKey; |
|
81
|
|
|
|
|
82
|
|
|
return $this; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* Get accountKey |
|
87
|
|
|
* |
|
88
|
|
|
* @return integer |
|
89
|
|
|
*/ |
|
90
|
|
|
public function getAccountKey() |
|
91
|
|
|
{ |
|
92
|
|
|
return $this->accountKey; |
|
93
|
|
|
} |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* Set balance |
|
97
|
|
|
* |
|
98
|
|
|
* @param float $balance |
|
99
|
|
|
* @return CorpAccountBalance |
|
100
|
|
|
*/ |
|
101
|
|
|
public function setBalance($balance) |
|
102
|
|
|
{ |
|
103
|
|
|
$this->balance = $balance; |
|
104
|
|
|
|
|
105
|
|
|
return $this; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* Get balance |
|
110
|
|
|
* |
|
111
|
|
|
* @return float |
|
112
|
|
|
*/ |
|
113
|
|
|
public function getBalance() |
|
114
|
|
|
{ |
|
115
|
|
|
return $this->balance; |
|
116
|
|
|
} |
|
117
|
|
|
} |
|
118
|
|
|
|