feat : mise à jour du bon de réception WIP
This commit is contained in:
@@ -4,10 +4,56 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\Metadata\GetCollection;
|
||||
use ApiPlatform\Metadata\Patch;
|
||||
use ApiPlatform\Metadata\Post;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'bovin_shipment')]
|
||||
#[ApiResource(
|
||||
operations: [
|
||||
new Get(
|
||||
requirements: ['id' => '\d+'],
|
||||
normalizationContext: ['groups' => ['bovin-shipment:read']],
|
||||
),
|
||||
new GetCollection(
|
||||
normalizationContext: ['groups' => ['bovin-shipment:read']],
|
||||
),
|
||||
new Post(
|
||||
normalizationContext: ['groups' => ['bovin-shipment:read']],
|
||||
denormalizationContext: ['groups' => ['bovin-shipment:write']],
|
||||
),
|
||||
new Patch(
|
||||
requirements: ['id' => '\d+'],
|
||||
normalizationContext: ['groups' => ['bovin-shipment:read']],
|
||||
denormalizationContext: ['groups' => ['bovin-shipment:write']],
|
||||
),
|
||||
// new Get(
|
||||
// uriTemplate: '/receptions/weigh',
|
||||
// openapi: new OpenApiOperation(
|
||||
// summary: 'Fetch the current weight reading',
|
||||
// description: 'Queries the pont-bascule and returns the weight data.',
|
||||
// ),
|
||||
// normalizationContext: ['groups' => ['reception:weigh:read']],
|
||||
// output: PontBasculeReading::class,
|
||||
// provider: ReceptionWeighingProvider::class,
|
||||
// ),
|
||||
// new Get(
|
||||
// uriTemplate: '/receptions/{id}/receipt',
|
||||
// requirements: ['id' => '\d+'],
|
||||
// openapi: new OpenApiOperation(
|
||||
// summary: 'Render a reception receipt',
|
||||
// description: 'Returns a PDF receipt for the reception.',
|
||||
// ),
|
||||
// output: false,
|
||||
// provider: ReceptionReceiptProvider::class,
|
||||
// ),
|
||||
],
|
||||
)]
|
||||
class BovinShipment
|
||||
{
|
||||
#[ORM\Id]
|
||||
|
||||
Reference in New Issue
Block a user