add api platform annotations

This commit is contained in:
Tykayn 2024-07-17 22:09:46 +02:00 committed by tykayn
parent 89b269bcdf
commit 5395dd2fb6
9 changed files with 23 additions and 6 deletions

View File

@ -24,11 +24,14 @@
<component name="ChangeListManager">
<list default="true" id="7b6ae3ea-b7de-4daa-94af-b6fb4f3c8b8e" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/composer.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/composer.lock" beforeDir="false" afterPath="$PROJECT_DIR$/composer.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/bundles.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bundles.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/ExepenseConfig.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Entity/ExepenseConfig.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/Festival.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Entity/Festival.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/Product.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Entity/Product.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/symfony.lock" beforeDir="false" afterPath="$PROJECT_DIR$/symfony.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/ProductCategory.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Entity/ProductCategory.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/ProductSold.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Entity/ProductSold.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/SellRecord.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Entity/SellRecord.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/SerieFestival.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Entity/SerieFestival.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Entity/User.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Entity/User.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -314,6 +317,7 @@
<workItem from="1721124162582" duration="4590000" />
<workItem from="1721135270174" duration="484000" />
<workItem from="1721135995908" duration="8940000" />
<workItem from="1721246789470" duration="170000" />
</task>
<servers />
</component>

View File

@ -4,8 +4,10 @@ namespace App\Entity;
use App\Repository\ExepenseConfigRepository;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\ApiResource;
#[ORM\Entity(repositoryClass: ExepenseConfigRepository::class)]
#[ApiResource]
class ExepenseConfig
{
#[ORM\Id]

View File

@ -6,8 +6,10 @@ use App\Repository\FestivalRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\ApiResource;
#[ORM\Entity(repositoryClass: FestivalRepository::class)]
#[ApiResource]
class Festival
{
#[ORM\Id]

View File

@ -2,8 +2,7 @@
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\ProductRepository;
use Doctrine\ORM\Mapping as ORM;

View File

@ -6,8 +6,10 @@ use App\Repository\ProductCategoryRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\ApiResource;
#[ORM\Entity(repositoryClass: ProductCategoryRepository::class)]
#[ApiResource]
class ProductCategory
{
#[ORM\Id]

View File

@ -4,8 +4,10 @@ namespace App\Entity;
use App\Repository\ProductSoldRepository;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\ApiResource;
#[ORM\Entity(repositoryClass: ProductSoldRepository::class)]
#[ApiResource]
class ProductSold
{
#[ORM\Id]

View File

@ -5,8 +5,10 @@ namespace App\Entity;
use App\Repository\SellRecordRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\ApiResource;
#[ORM\Entity(repositoryClass: SellRecordRepository::class)]
#[ApiResource]
class SellRecord
{
#[ORM\Id]

View File

@ -5,8 +5,10 @@ namespace App\Entity;
use App\Repository\SerieFestivalRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\ApiResource;
#[ORM\Entity(repositoryClass: SerieFestivalRepository::class)]
#[ApiResource]
class SerieFestival
{
#[ORM\Id]

View File

@ -10,7 +10,9 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use ApiPlatform\Metadata\ApiResource;
#[ApiResource]
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[ORM\Table(name: '`user`')]
#[UniqueEntity(fields: ['email'], message: 'There is already an account with this email')]