@@ -51,8 +51,9 @@ |
||
| 51 | 51 | $this->peopleService->getMyCompanies() |
| 52 | 52 | ); |
| 53 | 53 | |
| 54 | - if ($company) |
|
| 55 | - $qb->andWhere('pe = :company')->setParameter('company', $company); |
|
| 54 | + if ($company) { |
|
| 55 | + $qb->andWhere('pe = :company')->setParameter('company', $company); |
|
| 56 | + } |
|
| 56 | 57 | |
| 57 | 58 | return $qb->getQuery()->getResult(); |
| 58 | 59 | } |
@@ -23,20 +23,20 @@ discard block |
||
| 23 | 23 | new Get(security: 'is_granted(\'PUBLIC_ACCESS\')',), |
| 24 | 24 | new Put( |
| 25 | 25 | security: 'is_granted(\'ROLE_CLIENT\')', |
| 26 | - denormalizationContext: ['groups' => ['product_group_product:write']] |
|
| 26 | + denormalizationContext: [ 'groups' => [ 'product_group_product:write' ] ] |
|
| 27 | 27 | ), |
| 28 | 28 | new Delete(security: 'is_granted(\'ROLE_CLIENT\')'), |
| 29 | 29 | new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'), |
| 30 | 30 | new GetCollection(security: 'is_granted(\'PUBLIC_ACCESS\')',) |
| 31 | 31 | ], |
| 32 | - formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
|
| 33 | - normalizationContext: ['groups' => ['product_group_product:read']], |
|
| 34 | - denormalizationContext: ['groups' => ['product_group_product:write']] |
|
| 35 | -)] |
|
| 32 | + formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ], |
|
| 33 | + normalizationContext: [ 'groups' => [ 'product_group_product:read' ] ], |
|
| 34 | + denormalizationContext: [ 'groups' => [ 'product_group_product:write' ] ] |
|
| 35 | +) ] |
|
| 36 | 36 | |
| 37 | -#[ApiFilter(OrderFilter::class, properties: ['productGroup.productGroup' => 'ASC', 'product.product' => 'ASC'])] |
|
| 38 | -#[ORM\Table(name: 'product_group_product')] |
|
| 39 | -#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductGroupProductRepository::class)] |
|
| 37 | +#[ApiFilter(OrderFilter::class, properties: [ 'productGroup.productGroup' => 'ASC', 'product.product' => 'ASC' ]) ] |
|
| 38 | +#[ORM\Table(name: 'product_group_product') ] |
|
| 39 | +#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductGroupProductRepository::class) ] |
|
| 40 | 40 | |
| 41 | 41 | class ProductGroupProduct |
| 42 | 42 | { |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @Groups({"product_group_product:read","product_group:write","product_group_product:write"}) |
| 47 | 47 | */ |
| 48 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['id' => 'exact'])] |
|
| 49 | - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] |
|
| 50 | - #[ORM\Id] |
|
| 51 | - #[ORM\GeneratedValue(strategy: 'IDENTITY')] |
|
| 48 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'id' => 'exact' ]) ] |
|
| 49 | + #[ORM\Column(name: 'id', type: 'integer', nullable: false) ] |
|
| 50 | + #[ORM\Id ] |
|
| 51 | + #[ORM\GeneratedValue(strategy: 'IDENTITY') ] |
|
| 52 | 52 | |
| 53 | 53 | private $id; |
| 54 | 54 | |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | * |
| 58 | 58 | * @Groups({"product_group_product:read","product_group:write","product_group_product:write"}) |
| 59 | 59 | */ |
| 60 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'exact'])] |
|
| 61 | - #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id', nullable: false)] |
|
| 62 | - #[ORM\ManyToOne(targetEntity: \Product::class)] |
|
| 60 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'exact' ]) ] |
|
| 61 | + #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id', nullable: false) ] |
|
| 62 | + #[ORM\ManyToOne(targetEntity: \Product::class) ] |
|
| 63 | 63 | |
| 64 | 64 | private $product; |
| 65 | 65 | |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @Groups({"product_group_product:read","product_group:write","product_group_product:write"}) |
| 70 | 70 | */ |
| 71 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['productGroup' => 'exact'])] |
|
| 72 | - #[ORM\JoinColumn(name: 'product_group_id', referencedColumnName: 'id', nullable: true)] |
|
| 73 | - #[ORM\ManyToOne(targetEntity: \ProductGroup::class)] |
|
| 71 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productGroup' => 'exact' ]) ] |
|
| 72 | + #[ORM\JoinColumn(name: 'product_group_id', referencedColumnName: 'id', nullable: true) ] |
|
| 73 | + #[ORM\ManyToOne(targetEntity: \ProductGroup::class) ] |
|
| 74 | 74 | |
| 75 | 75 | private $productGroup; |
| 76 | 76 | |
@@ -79,8 +79,8 @@ discard block |
||
| 79 | 79 | * |
| 80 | 80 | * @Groups({"product_group_product:read","product_group:write","product_group_product:write"}) |
| 81 | 81 | */ |
| 82 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['productType' => 'exact'])] |
|
| 83 | - #[ORM\Column(name: 'product_type', type: 'string', columnDefinition: "ENUM('feedstock', 'component', 'package')", nullable: false)] |
|
| 82 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productType' => 'exact' ]) ] |
|
| 83 | + #[ORM\Column(name: 'product_type', type: 'string', columnDefinition: "ENUM('feedstock', 'component', 'package')", nullable: false) ] |
|
| 84 | 84 | |
| 85 | 85 | private $productType; |
| 86 | 86 | |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @Groups({"product_group_product:read","product_group:write","product_group_product:write"}) |
| 91 | 91 | */ |
| 92 | - #[ORM\JoinColumn(name: 'product_child_id', referencedColumnName: 'id', nullable: true)] |
|
| 93 | - #[ORM\ManyToOne(targetEntity: \Product::class)] |
|
| 92 | + #[ORM\JoinColumn(name: 'product_child_id', referencedColumnName: 'id', nullable: true) ] |
|
| 93 | + #[ORM\ManyToOne(targetEntity: \Product::class) ] |
|
| 94 | 94 | private $productChild; |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * |
| 99 | 99 | * @Groups({"product_group_product:read","product_group:write","product_group_product:write"}) |
| 100 | 100 | */ |
| 101 | - #[ORM\Column(name: 'quantity', type: 'float', precision: 10, scale: 2, nullable: false, options: ['default' => '1.00'])] |
|
| 101 | + #[ORM\Column(name: 'quantity', type: 'float', precision: 10, scale: 2, nullable: false, options: [ 'default' => '1.00' ]) ] |
|
| 102 | 102 | private $quantity = 0; |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * |
| 107 | 107 | * @Groups({"product_group_product:read","product_group:write","product_group_product:write"}) |
| 108 | 108 | */ |
| 109 | - #[ORM\Column(name: 'price', type: 'float', precision: 10, scale: 2, nullable: false)] |
|
| 109 | + #[ORM\Column(name: 'price', type: 'float', precision: 10, scale: 2, nullable: false) ] |
|
| 110 | 110 | private $price = 0; |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * |
| 115 | 115 | * @Groups({"product_group_product:read","product_group:write","product_group_product:write"}) |
| 116 | 116 | */ |
| 117 | - #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: ['default' => '1'])] |
|
| 117 | + #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: [ 'default' => '1' ]) ] |
|
| 118 | 118 | private $active = true; |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -22,51 +22,51 @@ |
||
| 22 | 22 | #[ApiResource( |
| 23 | 23 | operations: [ |
| 24 | 24 | new Get(security: 'is_granted(\'PUBLIC_ACCESS\')'), |
| 25 | - new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['inventory:write']]), |
|
| 25 | + new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'inventory:write' ] ]), |
|
| 26 | 26 | new Delete(security: 'is_granted(\'ROLE_CLIENT\')'), |
| 27 | 27 | new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'), |
| 28 | 28 | new GetCollection(security: 'is_granted(\'PUBLIC_ACCESS\')'), |
| 29 | 29 | ], |
| 30 | - formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
|
| 31 | - normalizationContext: ['groups' => ['inventory:read']], |
|
| 32 | - denormalizationContext: ['groups' => ['inventory:write']] |
|
| 33 | -)] |
|
| 34 | -#[ApiFilter(OrderFilter::class, properties: ['inventory', 'type'])] |
|
| 35 | -#[ApiFilter(SearchFilter::class, properties: ['id' => 'exact', 'inventory' => 'partial', 'type' => 'exact', 'people' => 'exact'])] |
|
| 36 | -#[ORM\Table(name: 'inventory')] |
|
| 37 | -#[ORM\Index(name: 'people_id', columns: ['people_id'])] |
|
| 38 | -#[ORM\Entity(repositoryClass: \ControleOnline\Repository\InventoryRepository::class)] |
|
| 30 | + formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ], |
|
| 31 | + normalizationContext: [ 'groups' => [ 'inventory:read' ] ], |
|
| 32 | + denormalizationContext: [ 'groups' => [ 'inventory:write' ] ] |
|
| 33 | +) ] |
|
| 34 | +#[ApiFilter(OrderFilter::class, properties: [ 'inventory', 'type' ]) ] |
|
| 35 | +#[ApiFilter(SearchFilter::class, properties: [ 'id' => 'exact', 'inventory' => 'partial', 'type' => 'exact', 'people' => 'exact' ]) ] |
|
| 36 | +#[ORM\Table(name: 'inventory') ] |
|
| 37 | +#[ORM\Index(name: 'people_id', columns: [ 'people_id' ]) ] |
|
| 38 | +#[ORM\Entity(repositoryClass: \ControleOnline\Repository\InventoryRepository::class) ] |
|
| 39 | 39 | class Inventory |
| 40 | 40 | { |
| 41 | 41 | /** |
| 42 | 42 | * @var int |
| 43 | 43 | * @Groups({"inventory:read", "inventory:write"}) |
| 44 | 44 | */ |
| 45 | - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] |
|
| 46 | - #[ORM\Id] |
|
| 47 | - #[ORM\GeneratedValue(strategy: 'IDENTITY')] |
|
| 45 | + #[ORM\Column(name: 'id', type: 'integer', nullable: false) ] |
|
| 46 | + #[ORM\Id ] |
|
| 47 | + #[ORM\GeneratedValue(strategy: 'IDENTITY') ] |
|
| 48 | 48 | private $id; |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * @var string |
| 52 | 52 | * @Groups({"inventory:read", "inventory:write"}) |
| 53 | 53 | */ |
| 54 | - #[ORM\Column(name: 'inventory', type: 'string', length: 255, nullable: false)] |
|
| 54 | + #[ORM\Column(name: 'inventory', type: 'string', length: 255, nullable: false) ] |
|
| 55 | 55 | private $inventory; |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * @var string |
| 59 | 59 | * @Groups({"inventory:read", "inventory:write"}) |
| 60 | 60 | */ |
| 61 | - #[ORM\Column(name: 'type', type: 'string', length: 50, nullable: false)] |
|
| 61 | + #[ORM\Column(name: 'type', type: 'string', length: 50, nullable: false) ] |
|
| 62 | 62 | private $type; |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * @var \ControleOnline\Entity\People |
| 66 | 66 | * @Groups({"inventory:read", "inventory:write"}) |
| 67 | 67 | */ |
| 68 | - #[ORM\JoinColumn(name: 'people_id', referencedColumnName: 'id', nullable: false)] |
|
| 69 | - #[ORM\ManyToOne(targetEntity: People::class)] |
|
| 68 | + #[ORM\JoinColumn(name: 'people_id', referencedColumnName: 'id', nullable: false) ] |
|
| 69 | + #[ORM\ManyToOne(targetEntity: People::class) ] |
|
| 70 | 70 | private $people; |
| 71 | 71 | |
| 72 | 72 | public function getId(): ?int |
@@ -26,19 +26,19 @@ discard block |
||
| 26 | 26 | new Get(security: 'is_granted(\'PUBLIC_ACCESS\')',), |
| 27 | 27 | new Put( |
| 28 | 28 | security: 'is_granted(\'ROLE_CLIENT\')', |
| 29 | - denormalizationContext: ['groups' => ['product_group:write']] |
|
| 29 | + denormalizationContext: [ 'groups' => [ 'product_group:write' ] ] |
|
| 30 | 30 | ), |
| 31 | 31 | new Delete(security: 'is_granted(\'ROLE_CLIENT\')'), |
| 32 | 32 | new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'), |
| 33 | 33 | new GetCollection(security: 'is_granted(\'PUBLIC_ACCESS\')',) |
| 34 | 34 | ], |
| 35 | - formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
|
| 36 | - normalizationContext: ['groups' => ['product_group:read']], |
|
| 37 | - denormalizationContext: ['groups' => ['product_group:write']] |
|
| 38 | -)] |
|
| 39 | -#[ApiFilter(OrderFilter::class, properties: ['productGroup'])] |
|
| 40 | -#[ORM\Table(name: 'product_group')] |
|
| 41 | -#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductGroupRepository::class)] |
|
| 35 | + formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ], |
|
| 36 | + normalizationContext: [ 'groups' => [ 'product_group:read' ] ], |
|
| 37 | + denormalizationContext: [ 'groups' => [ 'product_group:write' ] ] |
|
| 38 | +) ] |
|
| 39 | +#[ApiFilter(OrderFilter::class, properties: [ 'productGroup' ]) ] |
|
| 40 | +#[ORM\Table(name: 'product_group') ] |
|
| 41 | +#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductGroupRepository::class) ] |
|
| 42 | 42 | |
| 43 | 43 | class ProductGroup |
| 44 | 44 | { |
@@ -47,10 +47,10 @@ discard block |
||
| 47 | 47 | * |
| 48 | 48 | * @Groups({"product_group:read","product_group:write","order_product:read"}) |
| 49 | 49 | */ |
| 50 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['id' => 'exact'])] |
|
| 51 | - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] |
|
| 52 | - #[ORM\Id] |
|
| 53 | - #[ORM\GeneratedValue(strategy: 'IDENTITY')] |
|
| 50 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'id' => 'exact' ]) ] |
|
| 51 | + #[ORM\Column(name: 'id', type: 'integer', nullable: false) ] |
|
| 52 | + #[ORM\Id ] |
|
| 53 | + #[ORM\GeneratedValue(strategy: 'IDENTITY') ] |
|
| 54 | 54 | private $id; |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | * |
| 59 | 59 | * @Groups({"product_group:read","product_group:write","order_product:read"}) |
| 60 | 60 | */ |
| 61 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['productGroup' => 'exact'])] |
|
| 62 | - #[ORM\Column(name: 'product_group', type: 'string', length: 255, nullable: false)] |
|
| 61 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productGroup' => 'exact' ]) ] |
|
| 62 | + #[ORM\Column(name: 'product_group', type: 'string', length: 255, nullable: false) ] |
|
| 63 | 63 | |
| 64 | 64 | private $productGroup; |
| 65 | 65 | |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @Groups({"product_group:read","product_group:write","order_product:read"}) |
| 70 | 70 | */ |
| 71 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['priceCalculation' => 'exact'])] |
|
| 72 | - #[ORM\Column(name: 'price_calculation', type: 'string', length: 0, nullable: false, options: ['default' => "'sum'"])] |
|
| 71 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'priceCalculation' => 'exact' ]) ] |
|
| 72 | + #[ORM\Column(name: 'price_calculation', type: 'string', length: 0, nullable: false, options: [ 'default' => "'sum'" ]) ] |
|
| 73 | 73 | |
| 74 | 74 | private $priceCalculation = 'sum'; |
| 75 | 75 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * |
| 79 | 79 | * @Groups({"product_group:read","product_group:write","order_product:read"}) |
| 80 | 80 | */ |
| 81 | - #[ORM\Column(name: 'required', type: 'boolean', nullable: false)] |
|
| 81 | + #[ORM\Column(name: 'required', type: 'boolean', nullable: false) ] |
|
| 82 | 82 | private $required = 0; |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @Groups({"product_group:read","product_group:write","order_product:read"}) |
| 88 | 88 | */ |
| 89 | - #[ORM\Column(name: 'minimum', type: 'integer', nullable: true, options: ['default' => 'NULL'])] |
|
| 89 | + #[ORM\Column(name: 'minimum', type: 'integer', nullable: true, options: [ 'default' => 'NULL' ]) ] |
|
| 90 | 90 | private $minimum = NULL; |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * |
| 95 | 95 | * @Groups({"product_group:read","product_group:write","order_product:read"}) |
| 96 | 96 | */ |
| 97 | - #[ORM\Column(name: 'maximum', type: 'integer', nullable: true, options: ['default' => 'NULL'])] |
|
| 97 | + #[ORM\Column(name: 'maximum', type: 'integer', nullable: true, options: [ 'default' => 'NULL' ]) ] |
|
| 98 | 98 | private $maximum = NULL; |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * |
| 103 | 103 | * @Groups({"product_group:read","product_group:write","order_product:read"}) |
| 104 | 104 | */ |
| 105 | - #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: ['default' => '1'])] |
|
| 105 | + #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: [ 'default' => '1' ]) ] |
|
| 106 | 106 | private $active = true; |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * |
| 111 | 111 | * @Groups({"product_group:read","product_group:write","order_product:read"}) |
| 112 | 112 | */ |
| 113 | - #[ORM\Column(name: 'group_order', type: 'integer', nullable: false)] |
|
| 113 | + #[ORM\Column(name: 'group_order', type: 'integer', nullable: false) ] |
|
| 114 | 114 | private $groupOrder = 0; |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -118,15 +118,15 @@ discard block |
||
| 118 | 118 | * |
| 119 | 119 | * @Groups({"product_group:write"}) |
| 120 | 120 | */ |
| 121 | - #[ORM\OneToMany(targetEntity: ProductGroupProduct::class, mappedBy: 'productGroup', orphanRemoval: true)] |
|
| 121 | + #[ORM\OneToMany(targetEntity: ProductGroupProduct::class, mappedBy: 'productGroup', orphanRemoval: true) ] |
|
| 122 | 122 | private $products; |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | 125 | * @Groups({"product_group:read","product_group:write"}) |
| 126 | 126 | */ |
| 127 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['productParent' => 'exact'])] |
|
| 128 | - #[ORM\JoinColumn(nullable: false)] |
|
| 129 | - #[ORM\ManyToOne(targetEntity: \ControleOnline\Entity\Product::class)] |
|
| 127 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productParent' => 'exact' ]) ] |
|
| 128 | + #[ORM\JoinColumn(nullable: false) ] |
|
| 129 | + #[ORM\ManyToOne(targetEntity: \ControleOnline\Entity\Product::class) ] |
|
| 130 | 130 | |
| 131 | 131 | private $productParent; |
| 132 | 132 | |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | public function addProduct(ProductGroupProduct $product): self |
| 291 | 291 | { |
| 292 | 292 | if (!$this->products->contains($product)) { |
| 293 | - $this->products[] = $product; |
|
| 293 | + $this->products[ ] = $product; |
|
| 294 | 294 | $product->setProductGroup($this); |
| 295 | 295 | } |
| 296 | 296 | |
@@ -27,150 +27,150 @@ |
||
| 27 | 27 | #[ApiResource( |
| 28 | 28 | operations: [ |
| 29 | 29 | new Get(security: 'is_granted(\'PUBLIC_ACCESS\')'), |
| 30 | - new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['product:write']]), |
|
| 30 | + new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'product:write' ] ]), |
|
| 31 | 31 | new Delete(security: 'is_granted(\'ROLE_CLIENT\')'), |
| 32 | 32 | new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'), |
| 33 | 33 | new GetCollection(security: 'is_granted(\'PUBLIC_ACCESS\')'), |
| 34 | 34 | ], |
| 35 | - formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
|
| 36 | - normalizationContext: ['groups' => ['product:read']], |
|
| 37 | - denormalizationContext: ['groups' => ['product:write']] |
|
| 38 | -)] |
|
| 39 | -#[ApiFilter(OrderFilter::class, properties: ['product', 'price', 'description'])] |
|
| 40 | -#[ApiFilter(RandomOrderFilter::class)] |
|
| 41 | -#[ORM\Table(name: 'product')] |
|
| 42 | -#[ORM\Index(name: 'product_unity_id', columns: ['product_unity_id'])] |
|
| 43 | -#[ORM\Index(name: 'IDX_D34A04AD979B1AD6', columns: ['company_id'])] |
|
| 44 | -#[ORM\Index(name: 'default_out_inventory_id', columns: ['default_out_inventory_id'])] |
|
| 45 | -#[ORM\Index(name: 'default_in_inventory_id', columns: ['default_in_inventory_id'])] |
|
| 46 | -#[ORM\UniqueConstraint(name: 'company_id', columns: ['company_id', 'sku'])] |
|
| 47 | -#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductRepository::class)] |
|
| 35 | + formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ], |
|
| 36 | + normalizationContext: [ 'groups' => [ 'product:read' ] ], |
|
| 37 | + denormalizationContext: [ 'groups' => [ 'product:write' ] ] |
|
| 38 | +) ] |
|
| 39 | +#[ApiFilter(OrderFilter::class, properties: [ 'product', 'price', 'description' ]) ] |
|
| 40 | +#[ApiFilter(RandomOrderFilter::class) ] |
|
| 41 | +#[ORM\Table(name: 'product') ] |
|
| 42 | +#[ORM\Index(name: 'product_unity_id', columns: [ 'product_unity_id' ]) ] |
|
| 43 | +#[ORM\Index(name: 'IDX_D34A04AD979B1AD6', columns: [ 'company_id' ]) ] |
|
| 44 | +#[ORM\Index(name: 'default_out_inventory_id', columns: [ 'default_out_inventory_id' ]) ] |
|
| 45 | +#[ORM\Index(name: 'default_in_inventory_id', columns: [ 'default_in_inventory_id' ]) ] |
|
| 46 | +#[ORM\UniqueConstraint(name: 'company_id', columns: [ 'company_id', 'sku' ]) ] |
|
| 47 | +#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductRepository::class) ] |
|
| 48 | 48 | class Product |
| 49 | 49 | { |
| 50 | 50 | /** |
| 51 | 51 | * @var int |
| 52 | 52 | * @Groups({"product_category:read","product:read","order_product:read"}) |
| 53 | 53 | */ |
| 54 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['id' => 'exact'])] |
|
| 55 | - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] |
|
| 56 | - #[ORM\Id] |
|
| 57 | - #[ORM\GeneratedValue(strategy: 'IDENTITY')] |
|
| 54 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'id' => 'exact' ]) ] |
|
| 55 | + #[ORM\Column(name: 'id', type: 'integer', nullable: false) ] |
|
| 56 | + #[ORM\Id ] |
|
| 57 | + #[ORM\GeneratedValue(strategy: 'IDENTITY') ] |
|
| 58 | 58 | private $id; |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 62 | 62 | */ |
| 63 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['product' => 'partial'])] |
|
| 64 | - #[ORM\Column(name: 'product', type: 'string', length: 255, nullable: true)] |
|
| 63 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'product' => 'partial' ]) ] |
|
| 64 | + #[ORM\Column(name: 'product', type: 'string', length: 255, nullable: true) ] |
|
| 65 | 65 | private $product; |
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * @Groups({"product:read","product_category:read","order_product:read"}) |
| 69 | 69 | */ |
| 70 | - #[ApiFilter(filterClass: ExistsFilter::class, properties: ['productFiles'])] |
|
| 71 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['productFiles.file.fileType' => 'exact'])] |
|
| 72 | - #[ORM\OneToMany(targetEntity: \ProductFile::class, mappedBy: 'product')] |
|
| 70 | + #[ApiFilter(filterClass: ExistsFilter::class, properties: [ 'productFiles' ]) ] |
|
| 71 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productFiles.file.fileType' => 'exact' ]) ] |
|
| 72 | + #[ORM\OneToMany(targetEntity: \ProductFile::class, mappedBy: 'product') ] |
|
| 73 | 73 | private $productFiles; |
| 74 | 74 | |
| 75 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['productCategory.category' => 'exact'])] |
|
| 76 | - #[ORM\OneToMany(targetEntity: \ProductCategory::class, mappedBy: 'product')] |
|
| 75 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productCategory.category' => 'exact' ]) ] |
|
| 76 | + #[ORM\OneToMany(targetEntity: \ProductCategory::class, mappedBy: 'product') ] |
|
| 77 | 77 | private $productCategory; |
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * @var string|null |
| 81 | 81 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 82 | 82 | */ |
| 83 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['sku' => 'partial'])] |
|
| 84 | - #[ORM\Column(name: 'sku', type: 'string', length: 32, nullable: true, options: ['default' => 'NULL'])] |
|
| 83 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'sku' => 'partial' ]) ] |
|
| 84 | + #[ORM\Column(name: 'sku', type: 'string', length: 32, nullable: true, options: [ 'default' => 'NULL' ]) ] |
|
| 85 | 85 | private $sku = null; |
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * @var string |
| 89 | 89 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 90 | 90 | */ |
| 91 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['type' => 'exact'])] |
|
| 92 | - #[ORM\Column(name: 'type', type: 'string', length: 0, nullable: false, options: ['default' => "'product'"])] |
|
| 91 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'type' => 'exact' ]) ] |
|
| 92 | + #[ORM\Column(name: 'type', type: 'string', length: 0, nullable: false, options: [ 'default' => "'product'" ]) ] |
|
| 93 | 93 | private $type = 'product'; |
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | 96 | * @var float |
| 97 | 97 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 98 | 98 | */ |
| 99 | - #[ORM\Column(name: 'price', type: 'float', precision: 10, scale: 0, nullable: false)] |
|
| 99 | + #[ORM\Column(name: 'price', type: 'float', precision: 10, scale: 0, nullable: false) ] |
|
| 100 | 100 | private $price = 0; |
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | 103 | * @var string |
| 104 | 104 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 105 | 105 | */ |
| 106 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['productCondition' => 'exact'])] |
|
| 107 | - #[ORM\Column(name: 'product_condition', type: 'string', length: 0, nullable: false, options: ['default' => "'new'"])] |
|
| 106 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'productCondition' => 'exact' ]) ] |
|
| 107 | + #[ORM\Column(name: 'product_condition', type: 'string', length: 0, nullable: false, options: [ 'default' => "'new'" ]) ] |
|
| 108 | 108 | private $productCondition = 'new'; |
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | 111 | * @var string |
| 112 | 112 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 113 | 113 | */ |
| 114 | - #[ORM\Column(name: 'description', type: 'string', length: 0, nullable: false)] |
|
| 114 | + #[ORM\Column(name: 'description', type: 'string', length: 0, nullable: false) ] |
|
| 115 | 115 | private $description = ''; |
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | 118 | * @var bool |
| 119 | 119 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 120 | 120 | */ |
| 121 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['featured' => 'exact'])] |
|
| 122 | - #[ORM\Column(name: 'featured', type: 'boolean', nullable: false, options: ['default' => '0'])] |
|
| 121 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'featured' => 'exact' ]) ] |
|
| 122 | + #[ORM\Column(name: 'featured', type: 'boolean', nullable: false, options: [ 'default' => '0' ]) ] |
|
| 123 | 123 | private $featured = false; |
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | 126 | * @var bool |
| 127 | 127 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 128 | 128 | */ |
| 129 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['active' => 'exact'])] |
|
| 130 | - #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: ['default' => '1'])] |
|
| 129 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'active' => 'exact' ]) ] |
|
| 130 | + #[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: [ 'default' => '1' ]) ] |
|
| 131 | 131 | private $active = true; |
| 132 | 132 | |
| 133 | 133 | /** |
| 134 | 134 | * @var \ControleOnline\Entity\People |
| 135 | 135 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 136 | 136 | */ |
| 137 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['company' => 'exact'])] |
|
| 138 | - #[ORM\JoinColumn(name: 'company_id', referencedColumnName: 'id')] |
|
| 139 | - #[ORM\ManyToOne(targetEntity: People::class)] |
|
| 137 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'company' => 'exact' ]) ] |
|
| 138 | + #[ORM\JoinColumn(name: 'company_id', referencedColumnName: 'id') ] |
|
| 139 | + #[ORM\ManyToOne(targetEntity: People::class) ] |
|
| 140 | 140 | private $company; |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | 143 | * @var ProductUnity |
| 144 | 144 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 145 | 145 | */ |
| 146 | - #[ORM\JoinColumn(name: 'product_unity_id', referencedColumnName: 'id')] |
|
| 147 | - #[ORM\ManyToOne(targetEntity: \ProductUnity::class)] |
|
| 146 | + #[ORM\JoinColumn(name: 'product_unity_id', referencedColumnName: 'id') ] |
|
| 147 | + #[ORM\ManyToOne(targetEntity: \ProductUnity::class) ] |
|
| 148 | 148 | private $productUnit; |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | 151 | * @var Queue |
| 152 | 152 | * @Groups({"product_category:read","product:read","product_group_product:read","order_product:read","order_product_queue:read","order:read","order_details:read","order:write","product:write"}) |
| 153 | 153 | */ |
| 154 | - #[ORM\JoinColumn(name: 'queue_id', referencedColumnName: 'id')] |
|
| 155 | - #[ORM\ManyToOne(targetEntity: \Queue::class)] |
|
| 154 | + #[ORM\JoinColumn(name: 'queue_id', referencedColumnName: 'id') ] |
|
| 155 | + #[ORM\ManyToOne(targetEntity: \Queue::class) ] |
|
| 156 | 156 | private $queue; |
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | 159 | * @var \ControleOnline\Entity\Inventory |
| 160 | 160 | * @Groups({"product:read", "product:write"}) |
| 161 | 161 | */ |
| 162 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['defaultOutInventory' => 'exact'])] |
|
| 163 | - #[ORM\JoinColumn(name: 'default_out_inventory_id', referencedColumnName: 'id', nullable: true)] |
|
| 164 | - #[ORM\ManyToOne(targetEntity: Inventory::class)] |
|
| 162 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'defaultOutInventory' => 'exact' ]) ] |
|
| 163 | + #[ORM\JoinColumn(name: 'default_out_inventory_id', referencedColumnName: 'id', nullable: true) ] |
|
| 164 | + #[ORM\ManyToOne(targetEntity: Inventory::class) ] |
|
| 165 | 165 | private $defaultOutInventory; |
| 166 | 166 | |
| 167 | 167 | /** |
| 168 | 168 | * @var \ControleOnline\Entity\Inventory |
| 169 | 169 | * @Groups({"product:read", "product:write"}) |
| 170 | 170 | */ |
| 171 | - #[ApiFilter(filterClass: SearchFilter::class, properties: ['defaultInInventory' => 'exact'])] |
|
| 172 | - #[ORM\JoinColumn(name: 'default_in_inventory_id', referencedColumnName: 'id', nullable: true)] |
|
| 173 | - #[ORM\ManyToOne(targetEntity: Inventory::class)] |
|
| 171 | + #[ApiFilter(filterClass: SearchFilter::class, properties: [ 'defaultInInventory' => 'exact' ]) ] |
|
| 172 | + #[ORM\JoinColumn(name: 'default_in_inventory_id', referencedColumnName: 'id', nullable: true) ] |
|
| 173 | + #[ORM\ManyToOne(targetEntity: Inventory::class) ] |
|
| 174 | 174 | private $defaultInInventory; |
| 175 | 175 | |
| 176 | 176 | public function __construct() |
@@ -24,46 +24,46 @@ discard block |
||
| 24 | 24 | #[ApiResource( |
| 25 | 25 | operations: [ |
| 26 | 26 | new Get(security: 'is_granted(\'PUBLIC_ACCESS\')'), |
| 27 | - new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: ['groups' => ['product_inventory:write']]), |
|
| 27 | + new Put(security: 'is_granted(\'ROLE_CLIENT\')', denormalizationContext: [ 'groups' => [ 'product_inventory:write' ] ]), |
|
| 28 | 28 | new Delete(security: 'is_granted(\'ROLE_CLIENT\')'), |
| 29 | 29 | new Post(securityPostDenormalize: 'is_granted(\'ROLE_CLIENT\')'), |
| 30 | 30 | new GetCollection(security: 'is_granted(\'PUBLIC_ACCESS\')'), |
| 31 | 31 | ], |
| 32 | - formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
|
| 33 | - normalizationContext: ['groups' => ['product_inventory:read']], |
|
| 34 | - denormalizationContext: ['groups' => ['product_inventory:write']] |
|
| 35 | -)] |
|
| 36 | -#[ApiFilter(OrderFilter::class, properties: ['id', 'available', 'sales', 'ordered', 'transit'])] |
|
| 37 | -#[ApiFilter(SearchFilter::class, properties: ['id' => 'exact', 'inventory' => 'exact', 'product' => 'exact', 'productUnity' => 'exact'])] |
|
| 38 | -#[ORM\Table(name: 'product_inventory')] |
|
| 39 | -#[ORM\Index(name: 'inventory_id', columns: ['inventory_id'])] |
|
| 40 | -#[ORM\Index(name: 'product_id', columns: ['product_id'])] |
|
| 41 | -#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductInventoryRepository::class)] |
|
| 32 | + formats: [ 'jsonld', 'json', 'html', 'jsonhal', 'csv' => [ 'text/csv' ] ], |
|
| 33 | + normalizationContext: [ 'groups' => [ 'product_inventory:read' ] ], |
|
| 34 | + denormalizationContext: [ 'groups' => [ 'product_inventory:write' ] ] |
|
| 35 | +) ] |
|
| 36 | +#[ApiFilter(OrderFilter::class, properties: [ 'id', 'available', 'sales', 'ordered', 'transit' ]) ] |
|
| 37 | +#[ApiFilter(SearchFilter::class, properties: [ 'id' => 'exact', 'inventory' => 'exact', 'product' => 'exact', 'productUnity' => 'exact' ]) ] |
|
| 38 | +#[ORM\Table(name: 'product_inventory') ] |
|
| 39 | +#[ORM\Index(name: 'inventory_id', columns: [ 'inventory_id' ]) ] |
|
| 40 | +#[ORM\Index(name: 'product_id', columns: [ 'product_id' ]) ] |
|
| 41 | +#[ORM\Entity(repositoryClass: \ControleOnline\Repository\ProductInventoryRepository::class) ] |
|
| 42 | 42 | class ProductInventory |
| 43 | 43 | { |
| 44 | 44 | /** |
| 45 | 45 | * @var int |
| 46 | 46 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 47 | 47 | */ |
| 48 | - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] |
|
| 49 | - #[ORM\Id] |
|
| 50 | - #[ORM\GeneratedValue(strategy: 'IDENTITY')] |
|
| 48 | + #[ORM\Column(name: 'id', type: 'integer', nullable: false) ] |
|
| 49 | + #[ORM\Id ] |
|
| 50 | + #[ORM\GeneratedValue(strategy: 'IDENTITY') ] |
|
| 51 | 51 | private $id; |
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * @var \ControleOnline\Entity\Inventory |
| 55 | 55 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 56 | 56 | */ |
| 57 | - #[ORM\JoinColumn(name: 'inventory_id', referencedColumnName: 'id', nullable: false)] |
|
| 58 | - #[ORM\ManyToOne(targetEntity: Inventory::class)] |
|
| 57 | + #[ORM\JoinColumn(name: 'inventory_id', referencedColumnName: 'id', nullable: false) ] |
|
| 58 | + #[ORM\ManyToOne(targetEntity: Inventory::class) ] |
|
| 59 | 59 | private $inventory; |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * @var \ControleOnline\Entity\Product |
| 63 | 63 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 64 | 64 | */ |
| 65 | - #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id', nullable: false)] |
|
| 66 | - #[ORM\ManyToOne(targetEntity: Product::class)] |
|
| 65 | + #[ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id', nullable: false) ] |
|
| 66 | + #[ORM\ManyToOne(targetEntity: Product::class) ] |
|
| 67 | 67 | private $product; |
| 68 | 68 | |
| 69 | 69 | |
@@ -72,42 +72,42 @@ discard block |
||
| 72 | 72 | * @var int |
| 73 | 73 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 74 | 74 | */ |
| 75 | - #[ORM\Column(name: 'available', type: 'integer', nullable: false, options: ['default' => 0])] |
|
| 75 | + #[ORM\Column(name: 'available', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ] |
|
| 76 | 76 | private $available = 0; |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * @var int |
| 80 | 80 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 81 | 81 | */ |
| 82 | - #[ORM\Column(name: 'sales', type: 'integer', nullable: false, options: ['default' => 0])] |
|
| 82 | + #[ORM\Column(name: 'sales', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ] |
|
| 83 | 83 | private $sales = 0; |
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | 86 | * @var int |
| 87 | 87 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 88 | 88 | */ |
| 89 | - #[ORM\Column(name: 'ordered', type: 'integer', nullable: false, options: ['default' => 0])] |
|
| 89 | + #[ORM\Column(name: 'ordered', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ] |
|
| 90 | 90 | private $ordered = 0; |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * @var int |
| 94 | 94 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 95 | 95 | */ |
| 96 | - #[ORM\Column(name: 'transit', type: 'integer', nullable: false, options: ['default' => 0])] |
|
| 96 | + #[ORM\Column(name: 'transit', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ] |
|
| 97 | 97 | private $transit = 0; |
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | 100 | * @var int |
| 101 | 101 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 102 | 102 | */ |
| 103 | - #[ORM\Column(name: 'minimum', type: 'integer', nullable: false, options: ['default' => 0])] |
|
| 103 | + #[ORM\Column(name: 'minimum', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ] |
|
| 104 | 104 | private $minimum = 0; |
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | 107 | * @var int |
| 108 | 108 | * @Groups({"product_inventory:read", "product_inventory:write"}) |
| 109 | 109 | */ |
| 110 | - #[ORM\Column(name: 'maximum', type: 'integer', nullable: false, options: ['default' => 0])] |
|
| 110 | + #[ORM\Column(name: 'maximum', type: 'integer', nullable: false, options: [ 'default' => 0 ]) ] |
|
| 111 | 111 | private $maximum = 0; |
| 112 | 112 | |
| 113 | 113 | public function getId(): ?int |