<?php
/**
 * @author Daniel Knudsen <d.knudsen@spawntree.de>
 * @date 12.12.23
 */


namespace App\ApiResource;

use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Doctrine\Orm\State\Options;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use App\Entity\Comment;
use App\Interface\OwnerInterface;
use App\State\EntityClassDtoStateProcessor;
use App\State\EntityToDtoStateProvider;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Patch;
use ApiPlatform\Metadata\Post;
use App\State\SaleSummaryStateProvider;
use App\Validator\IsValidOwner;
use Symfony\Component\PropertyInfo\Type;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Validator\Constraints\NotBlank;

#[ApiResource(
    shortName: 'SaleSummary',
    operations: [
        new GetCollection(),
    ],
    security: 'is_granted("ROLE_USER")',
    provider: SaleSummaryStateProvider::class,
)]
class SaleSummary
{
    public ?UserApi $owner = null;

    public ?string $ownerName = null;

    public ?int $turnover = null;

    public ?int $profit = null;
}