|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace ControleOnline\Entity; |
|
4
|
|
|
|
|
5
|
|
|
use Symfony\Component\Serializer\Attribute\Groups; |
|
|
|
|
|
|
6
|
|
|
use ControleOnline\Repository\PeopleLinkRepository; |
|
7
|
|
|
use ControleOnline\Listener\LogListener; |
|
|
|
|
|
|
8
|
|
|
|
|
9
|
|
|
use ApiPlatform\Metadata\ApiResource; |
|
|
|
|
|
|
10
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
|
|
11
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
|
|
|
|
|
12
|
|
|
use Doctrine\Common\Collections\Collection; |
|
|
|
|
|
|
13
|
|
|
|
|
14
|
|
|
#[ORM\Table(name: 'people_link')] |
|
15
|
|
|
#[ORM\Index(name: 'company_id', columns: ['company'])] |
|
16
|
|
|
#[ORM\UniqueConstraint(name: 'people_id', columns: ['people_id', 'company'])] |
|
17
|
|
|
#[ORM\Entity(repositoryClass: PeopleLinkRepository::class)] |
|
18
|
|
|
#[ORM\EntityListeners([LogListener::class])] |
|
19
|
|
|
class PeopleLink |
|
20
|
|
|
{ |
|
21
|
|
|
#[ORM\Column(type: 'integer', nullable: false)] |
|
22
|
|
|
#[ORM\Id] |
|
23
|
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')] |
|
24
|
|
|
private $id; |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* @var People |
|
28
|
|
|
*/ |
|
29
|
|
|
#[ORM\JoinColumn(name: 'company_id', referencedColumnName: 'id')] |
|
30
|
|
|
#[ORM\ManyToOne(targetEntity: People::class, inversedBy: 'company')] |
|
31
|
|
|
private $company; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @var People |
|
35
|
|
|
*/ |
|
36
|
|
|
#[ORM\JoinColumn(name: 'people_id', referencedColumnName: 'id')] |
|
37
|
|
|
#[ORM\ManyToOne(targetEntity: People::class, inversedBy: 'link')] |
|
38
|
|
|
private $people; |
|
39
|
|
|
|
|
40
|
|
|
#[ORM\Column(type: 'boolean', nullable: false)] |
|
41
|
|
|
private $enable = 1; |
|
42
|
|
|
|
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* @var string |
|
46
|
|
|
* |
|
47
|
|
|
*/ |
|
48
|
|
|
#[ORM\Column(name: 'link_type', type: 'string', columnDefinition: "ENUM('employee','client','provider','franchisee')", nullable: false)] |
|
49
|
|
|
private $link_type; |
|
50
|
|
|
|
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* @var float |
|
54
|
|
|
*/ |
|
55
|
|
|
#[ORM\Column(name: 'comission', type: 'float', nullable: false)] |
|
56
|
|
|
private $comission = 0; |
|
57
|
|
|
|
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @var float |
|
61
|
|
|
*/ |
|
62
|
|
|
#[ORM\Column(name: 'minimum_comission', type: 'float', nullable: false)] |
|
63
|
|
|
private $minimum_comission = 0; |
|
64
|
|
|
|
|
65
|
|
|
public function getId() |
|
66
|
|
|
{ |
|
67
|
|
|
return $this->id; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
public function setCompany(People $company = null) |
|
71
|
|
|
{ |
|
72
|
|
|
$this->company = $company; |
|
73
|
|
|
|
|
74
|
|
|
return $this; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
public function getCompany() |
|
78
|
|
|
{ |
|
79
|
|
|
return $this->company; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
public function setPeople(People $people = null) |
|
83
|
|
|
{ |
|
84
|
|
|
$this->people = $people; |
|
85
|
|
|
|
|
86
|
|
|
return $this; |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
public function getPeople() |
|
90
|
|
|
{ |
|
91
|
|
|
return $this->people; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
public function getEnabled() |
|
95
|
|
|
{ |
|
96
|
|
|
return $this->enable; |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
public function setEnabled($enable) |
|
100
|
|
|
{ |
|
101
|
|
|
$this->enable = $enable ?: 0; |
|
102
|
|
|
|
|
103
|
|
|
return $this; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* Set minimum_comission |
|
109
|
|
|
* |
|
110
|
|
|
* @param float $minimum_comission |
|
111
|
|
|
* @return PeopleSalesman |
|
|
|
|
|
|
112
|
|
|
*/ |
|
113
|
|
|
public function setMinimumComission($minimum_comission): self |
|
114
|
|
|
{ |
|
115
|
|
|
$this->minimum_comission = $minimum_comission; |
|
116
|
|
|
|
|
117
|
|
|
return $this; |
|
|
|
|
|
|
118
|
|
|
} |
|
119
|
|
|
|
|
120
|
|
|
/** |
|
121
|
|
|
* Get minimum_comission |
|
122
|
|
|
* |
|
123
|
|
|
* @return float |
|
124
|
|
|
*/ |
|
125
|
|
|
public function getMinimumComission(): float |
|
126
|
|
|
{ |
|
127
|
|
|
return $this->minimum_comission; |
|
128
|
|
|
} |
|
129
|
|
|
|
|
130
|
|
|
|
|
131
|
|
|
/** |
|
132
|
|
|
* Set comission |
|
133
|
|
|
* |
|
134
|
|
|
* @param float $comission |
|
135
|
|
|
* @return PeopleSalesman |
|
136
|
|
|
*/ |
|
137
|
|
|
public function setComission($comission): self |
|
138
|
|
|
{ |
|
139
|
|
|
$this->comission = $comission; |
|
140
|
|
|
|
|
141
|
|
|
return $this; |
|
|
|
|
|
|
142
|
|
|
} |
|
143
|
|
|
|
|
144
|
|
|
/** |
|
145
|
|
|
* Get comission |
|
146
|
|
|
* |
|
147
|
|
|
* @return float |
|
148
|
|
|
*/ |
|
149
|
|
|
public function getComission(): float |
|
150
|
|
|
{ |
|
151
|
|
|
return $this->comission; |
|
152
|
|
|
} |
|
153
|
|
|
|
|
154
|
|
|
/** |
|
155
|
|
|
* Get the value of link_type |
|
156
|
|
|
*/ |
|
157
|
|
|
public function getLinkType() |
|
158
|
|
|
{ |
|
159
|
|
|
return $this->link_type; |
|
160
|
|
|
} |
|
161
|
|
|
|
|
162
|
|
|
/** |
|
163
|
|
|
* Set the value of link_type |
|
164
|
|
|
*/ |
|
165
|
|
|
public function setLinkType($link_type): self |
|
166
|
|
|
{ |
|
167
|
|
|
$this->link_type = $link_type; |
|
168
|
|
|
|
|
169
|
|
|
return $this; |
|
170
|
|
|
} |
|
171
|
|
|
} |
|
172
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths