1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace App\Entity; |
4
|
|
|
|
5
|
|
|
use App\Entity\Attribute\Accessor as EntityAccessor; |
6
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
|
|
|
7
|
|
|
use Ds\Component\Model\Attribute\Accessor; |
|
|
|
|
8
|
|
|
use Ds\Component\Model\Type\Deletable; |
|
|
|
|
9
|
|
|
use Ds\Component\Model\Type\Identifiable; |
|
|
|
|
10
|
|
|
use Ds\Component\Model\Type\Identitiable; |
|
|
|
|
11
|
|
|
use Ds\Component\Model\Type\Ownable; |
|
|
|
|
12
|
|
|
use Ds\Component\Model\Type\Uuidentifiable; |
|
|
|
|
13
|
|
|
use Ds\Component\Model\Type\Versionable; |
|
|
|
|
14
|
|
|
use Ds\Component\Tenant\Model\Attribute\Accessor as TenantAccessor; |
|
|
|
|
15
|
|
|
use Ds\Component\Tenant\Model\Type\Tenantable; |
|
|
|
|
16
|
|
|
use Knp\DoctrineBehaviors\Model as Behavior; |
|
|
|
|
17
|
|
|
|
18
|
|
|
use ApiPlatform\Core\Annotation\ApiResource; |
|
|
|
|
19
|
|
|
use ApiPlatform\Core\Annotation\ApiProperty; |
|
|
|
|
20
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
21
|
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints as ORMAssert; |
|
|
|
|
22
|
|
|
use Symfony\Component\Serializer\Annotation As Serializer; |
|
|
|
|
23
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
|
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Class Individual |
27
|
|
|
* |
28
|
|
|
* @ApiResource( |
29
|
|
|
* attributes={ |
30
|
|
|
* "normalization_context"={ |
31
|
|
|
* "groups"={"individual_output"} |
32
|
|
|
* }, |
33
|
|
|
* "denormalization_context"={ |
34
|
|
|
* "groups"={"individual_input"} |
35
|
|
|
* }, |
36
|
|
|
* "filters"={ |
37
|
|
|
* "app.individual.search", |
38
|
|
|
* "app.individual.date", |
39
|
|
|
* "app.individual.order" |
40
|
|
|
* } |
41
|
|
|
* } |
42
|
|
|
* ) |
43
|
|
|
* @ORM\Entity(repositoryClass="App\Repository\IndividualRepository") |
44
|
|
|
* @ORM\Table(name="app_individual") |
45
|
|
|
* @ORM\Cache(usage="NONSTRICT_READ_WRITE") |
46
|
|
|
* @ORMAssert\UniqueEntity(fields="uuid") |
47
|
|
|
*/ |
48
|
|
|
class Individual implements Identifiable, Uuidentifiable, Ownable, Identitiable, Deletable, Versionable, Tenantable |
49
|
|
|
{ |
50
|
|
|
use Behavior\Timestampable\Timestampable; |
|
|
|
|
51
|
|
|
use Behavior\SoftDeletable\SoftDeletable; |
|
|
|
|
52
|
|
|
|
53
|
|
|
use Accessor\Id; |
|
|
|
|
54
|
|
|
use Accessor\Uuid; |
|
|
|
|
55
|
|
|
use Accessor\Owner; |
|
|
|
|
56
|
|
|
use Accessor\OwnerUuid; |
|
|
|
|
57
|
|
|
use EntityAccessor\Identity\Identity; |
58
|
|
|
use EntityAccessor\Identity\IdentityUuid; |
59
|
|
|
use EntityAccessor\Personas; |
60
|
|
|
use EntityAccessor\Roles; |
61
|
|
|
use Accessor\Deleted; |
|
|
|
|
62
|
|
|
use Accessor\Version; |
|
|
|
|
63
|
|
|
use TenantAccessor\Tenant; |
|
|
|
|
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @var integer |
67
|
|
|
* @ApiProperty(identifier=false, writable=false) |
68
|
|
|
* @Serializer\Groups({"individual_output"}) |
69
|
|
|
* @ORM\Id |
70
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
71
|
|
|
* @ORM\Column(name="id", type="integer") |
72
|
|
|
*/ |
73
|
|
|
private $id; |
|
|
|
|
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var string |
77
|
|
|
* @ApiProperty(identifier=true, writable=false) |
78
|
|
|
* @Serializer\Groups({"individual_output"}) |
79
|
|
|
* @ORM\Column(name="uuid", type="guid", unique=true) |
80
|
|
|
* @Assert\Uuid |
81
|
|
|
*/ |
82
|
|
|
private $uuid; |
|
|
|
|
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @var \DateTime |
86
|
|
|
* @ApiProperty(writable=false) |
87
|
|
|
* @Serializer\Groups({"individual_output"}) |
88
|
|
|
*/ |
89
|
|
|
protected $createdAt; |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @var \DateTime |
93
|
|
|
* @ApiProperty(writable=false) |
94
|
|
|
* @Serializer\Groups({"individual_output"}) |
95
|
|
|
*/ |
96
|
|
|
protected $updatedAt; |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @var \DateTime |
100
|
|
|
* @ApiProperty(writable=false) |
101
|
|
|
* @Serializer\Groups({"individual_output"}) |
102
|
|
|
*/ |
103
|
|
|
protected $deletedAt; |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @var string |
107
|
|
|
* @ApiProperty |
108
|
|
|
* @Serializer\Groups({"individual_output", "individual_input"}) |
109
|
|
|
* @ORM\Column(name="`owner`", type="string", length=255, nullable=true) |
110
|
|
|
* @Assert\NotBlank |
111
|
|
|
* @Assert\Length(min=1, max=255) |
112
|
|
|
*/ |
113
|
|
|
private $owner; |
|
|
|
|
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @var string |
117
|
|
|
* @ApiProperty |
118
|
|
|
* @Serializer\Groups({"individual_output", "individual_input"}) |
119
|
|
|
* @ORM\Column(name="owner_uuid", type="guid", nullable=true) |
120
|
|
|
* @Assert\NotBlank |
121
|
|
|
* @Assert\Uuid |
122
|
|
|
*/ |
123
|
|
|
private $ownerUuid; |
|
|
|
|
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection |
127
|
|
|
* @ApiProperty(writable=false) |
128
|
|
|
* @Serializer\Groups({"individual_output"}) |
129
|
|
|
* @ORM\OneToMany(targetEntity="IndividualPersona", mappedBy="individual", cascade={"persist", "remove"}) |
130
|
|
|
* @ORM\Cache(usage="NONSTRICT_READ_WRITE") |
131
|
|
|
*/ |
132
|
|
|
private $personas; |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @var \Doctrine\Common\Collections\ArrayCollection |
136
|
|
|
* @ApiProperty(writable=false) |
137
|
|
|
* @Serializer\Groups({"individual_output"}) |
138
|
|
|
* @ORM\OneToMany(targetEntity="IndividualRole", mappedBy="individual", cascade={"persist", "remove"}) |
139
|
|
|
* @ORM\Cache(usage="NONSTRICT_READ_WRITE") |
140
|
|
|
*/ |
141
|
|
|
private $roles; |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @var integer |
145
|
|
|
* @ApiProperty |
146
|
|
|
* @Serializer\Groups({"individual_output", "individual_input"}) |
147
|
|
|
* @ORM\Column(name="version", type="integer") |
148
|
|
|
* @ORM\Version |
149
|
|
|
* @Assert\NotBlank |
150
|
|
|
* @Assert\Type("integer") |
151
|
|
|
*/ |
152
|
|
|
private $version; |
|
|
|
|
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @var string |
156
|
|
|
* @ApiProperty(writable=false) |
157
|
|
|
* @Serializer\Groups({"individual_output"}) |
158
|
|
|
* @ORM\Column(name="tenant", type="guid") |
159
|
|
|
* @Assert\Uuid |
160
|
|
|
*/ |
161
|
|
|
private $tenant; |
|
|
|
|
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* Constructor |
165
|
|
|
*/ |
166
|
|
|
public function __construct() |
167
|
|
|
{ |
168
|
|
|
$this->personas = new ArrayCollection; |
169
|
|
|
$this->roles = new ArrayCollection; |
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