'exact'])] #[ORM\UniqueConstraint(name: 'uniq_bovin_shipment', columns: ['shipment_id', 'shipment_type_id'])] #[ORM\Table(name: 'bovin_shipment')] #[ApiResource( operations: [ new Get( requirements: ['id' => '\d+'], normalizationContext: ['groups' => ['shipment-bovine:read']], ), new GetCollection( normalizationContext: ['groups' => ['shipment-bovine:read']], ), new Post( normalizationContext: ['groups' => ['shipment-bovine:read']], denormalizationContext: ['groups' => ['shipment-bovine:write']], ), new Patch( normalizationContext: ['groups' => ['shipment-bovine:read']], denormalizationContext: ['groups' => ['shipment-bovine:write']], ), new Delete(), ], security: "is_granted('ROLE_USER')", )] class BovinShipment { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] #[Groups(['shipment:read', 'shipment-bovine:read'])] private ?int $id = null; #[ORM\ManyToOne(inversedBy: 'bovinShipments')] #[Groups(['shipment-bovine:read', 'shipment-bovine:write'])] #[ApiProperty(readableLink: true)] private ?Shipment $shipment = null; #[ORM\ManyToOne] #[Groups(['shipment:read', 'shipment-bovine:write', 'shipment-bovine:read'])] #[ApiProperty(readableLink: true)] private ?ShipmentType $shipmentType = null; #[ORM\Column] #[Groups(['shipment:read', 'shipment-bovine:write', 'shipment-bovine:read'])] private ?int $nbBovinSend = null; public function getId(): ?int { return $this->id; } public function getShipment(): ?Shipment { return $this->shipment; } public function setShipment(?Shipment $shipment): void { $this->shipment = $shipment; } public function getShipmentType(): ?ShipmentType { return $this->shipmentType; } public function setShipmentType(?ShipmentType $shipmentType): void { $this->shipmentType = $shipmentType; } public function getNbBovinSend(): ?int { return $this->nbBovinSend; } public function setNbBovinSend(?int $nbBovinSend): void { $this->nbBovinSend = $nbBovinSend; } }