1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ControleOnline\Entity; |
4
|
|
|
|
5
|
|
|
use ApiPlatform\Metadata\Get; |
|
|
|
|
6
|
|
|
use ApiPlatform\Metadata\ApiResource; |
|
|
|
|
7
|
|
|
use ApiPlatform\Metadata\ApiProperty; |
|
|
|
|
8
|
|
|
use ApiPlatform\Metadata\ApiFilter; |
|
|
|
|
9
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
10
|
|
|
use Symfony\Component\Serializer\Annotation\Groups; |
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* OrderInvoiceTax |
13
|
|
|
* |
14
|
|
|
* @ORM\EntityListeners ({ControleOnline\Listener\LogListener::class}) |
15
|
|
|
* @ORM\Table (name="order_invoice_tax", uniqueConstraints={@ORM\UniqueConstraint (name="order_id", columns={"order_id", "invoice_tax_id"}),@ORM\UniqueConstraint(name="invoice_type", columns={"issuer_id", "invoice_type", "order_id"})}, indexes={@ORM\Index (name="invoice_tax_id", columns={"invoice_tax_id"})}) |
16
|
|
|
* @ORM\Entity |
17
|
|
|
*/ |
18
|
|
|
#[ApiResource(operations: [new Get(security: 'is_granted(\'ROLE_CLIENT\')')], formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], normalizationContext: ['groups' => ['order_invoice_tax_read']], denormalizationContext: ['groups' => ['order_invoice_tax_write']])] |
19
|
|
|
class OrderInvoiceTax |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* @var integer |
23
|
|
|
* |
24
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false) |
25
|
|
|
* @ORM\Id |
26
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
27
|
|
|
*/ |
28
|
|
|
private $id; |
29
|
|
|
/** |
30
|
|
|
* @var \ControleOnline\Entity\InvoiceTax |
31
|
|
|
* |
32
|
|
|
* @ORM\ManyToOne(targetEntity="ControleOnline\Entity\InvoiceTax", inversedBy="order") |
33
|
|
|
* @ORM\JoinColumns({ |
34
|
|
|
* @ORM\JoinColumn(name="invoice_tax_id", referencedColumnName="id") |
35
|
|
|
* }) |
36
|
|
|
* @Groups({"order_read"}) |
37
|
|
|
*/ |
38
|
|
|
private $invoiceTax; |
39
|
|
|
/** |
40
|
|
|
* @var \ControleOnline\Entity\Order |
41
|
|
|
* |
42
|
|
|
* @ORM\ManyToOne(targetEntity="ControleOnline\Entity\Order", inversedBy="invoiceTax") |
43
|
|
|
* @ORM\JoinColumns({ |
44
|
|
|
* @ORM\JoinColumn(name="order_id", referencedColumnName="id") |
45
|
|
|
* }) |
46
|
|
|
*/ |
47
|
|
|
private $order; |
48
|
|
|
/** |
49
|
|
|
* @var \ControleOnline\Entity\People |
|
|
|
|
50
|
|
|
* |
51
|
|
|
* @ORM\ManyToOne(targetEntity="ControleOnline\Entity\People") |
52
|
|
|
* @ORM\JoinColumns({ |
53
|
|
|
* @ORM\JoinColumn(name="issuer_id", referencedColumnName="id") |
54
|
|
|
* }) |
55
|
|
|
*/ |
56
|
|
|
private $issuer; |
57
|
|
|
/** |
58
|
|
|
* @var string |
59
|
|
|
* |
60
|
|
|
* @ORM\Column(name="invoice_type", type="integer", nullable=false) |
61
|
|
|
* @Groups({"order_detail_status_read"}) |
62
|
|
|
*/ |
63
|
|
|
private $invoiceType; |
64
|
|
|
public function __construct() |
65
|
|
|
{ |
66
|
|
|
$this->order = new \Doctrine\Common\Collections\ArrayCollection(); |
|
|
|
|
67
|
|
|
$this->invoiceTax = new \Doctrine\Common\Collections\ArrayCollection(); |
68
|
|
|
} |
69
|
|
|
/** |
70
|
|
|
* Get id |
71
|
|
|
* |
72
|
|
|
* @return integer |
73
|
|
|
*/ |
74
|
|
|
public function getId() |
75
|
|
|
{ |
76
|
|
|
return $this->id; |
77
|
|
|
} |
78
|
|
|
/** |
79
|
|
|
* Set invoiceTax |
80
|
|
|
* |
81
|
|
|
* @param \ControleOnline\Entity\InvoiceTax $invoice_tax |
82
|
|
|
* @return OrderInvoiceTax |
83
|
|
|
*/ |
84
|
|
|
public function setInvoiceTax(\ControleOnline\Entity\InvoiceTax $invoice_tax = null) |
85
|
|
|
{ |
86
|
|
|
$this->invoiceTax = $invoice_tax; |
87
|
|
|
return $this; |
88
|
|
|
} |
89
|
|
|
/** |
90
|
|
|
* Get invoiceTax |
91
|
|
|
* |
92
|
|
|
* @return \ControleOnline\Entity\InvoiceTax |
93
|
|
|
*/ |
94
|
|
|
public function getInvoiceTax() |
95
|
|
|
{ |
96
|
|
|
return $this->invoiceTax; |
97
|
|
|
} |
98
|
|
|
/** |
99
|
|
|
* Set order |
100
|
|
|
* |
101
|
|
|
* @param \ControleOnline\Entity\Order $order |
102
|
|
|
* @return OrderInvoiceTax |
103
|
|
|
*/ |
104
|
|
|
public function setOrder(\ControleOnline\Entity\Order $order = null) |
105
|
|
|
{ |
106
|
|
|
$this->order = $order; |
107
|
|
|
return $this; |
108
|
|
|
} |
109
|
|
|
/** |
110
|
|
|
* Get order |
111
|
|
|
* |
112
|
|
|
* @return \ControleOnline\Entity\Order |
113
|
|
|
*/ |
114
|
|
|
public function getOrder() |
115
|
|
|
{ |
116
|
|
|
return $this->order; |
117
|
|
|
} |
118
|
|
|
/** |
119
|
|
|
* Set invoice_type |
120
|
|
|
* |
121
|
|
|
* @param integer $invoice_type |
122
|
|
|
* @return Order |
123
|
|
|
*/ |
124
|
|
|
public function setInvoiceType($invoice_type) |
125
|
|
|
{ |
126
|
|
|
$this->invoiceType = $invoice_type; |
127
|
|
|
return $this; |
|
|
|
|
128
|
|
|
} |
129
|
|
|
/** |
130
|
|
|
* Get invoice_type |
131
|
|
|
* |
132
|
|
|
* @return integer |
133
|
|
|
*/ |
134
|
|
|
public function getInvoiceType() |
135
|
|
|
{ |
136
|
|
|
return $this->invoiceType; |
|
|
|
|
137
|
|
|
} |
138
|
|
|
/** |
139
|
|
|
* Set issuer |
140
|
|
|
* |
141
|
|
|
* @param \ControleOnline\Entity\People $issuer |
142
|
|
|
* @return People |
143
|
|
|
*/ |
144
|
|
|
public function setIssuer(\ControleOnline\Entity\People $issuer = null) |
145
|
|
|
{ |
146
|
|
|
$this->issuer = $issuer; |
147
|
|
|
return $this; |
|
|
|
|
148
|
|
|
} |
149
|
|
|
/** |
150
|
|
|
* Get issuer |
151
|
|
|
* |
152
|
|
|
* @return \ControleOnline\Entity\People |
153
|
|
|
*/ |
154
|
|
|
public function getIssuer() |
155
|
|
|
{ |
156
|
|
|
return $this->issuer; |
157
|
|
|
} |
158
|
|
|
} |
159
|
|
|
|
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