Reading prices from api.esios.ree.es
This commit is contained in:
36
backend/symfony/src/Entity/PriceNow.php
Normal file
36
backend/symfony/src/Entity/PriceNow.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
|
||||
use ApiPlatform\Core\Annotation\ApiProperty;
|
||||
use ApiPlatform\Core\Annotation\ApiResource;
|
||||
use ApiPlatform\Core\Action\NotFoundAction;
|
||||
|
||||
/**
|
||||
* @ApiResource(
|
||||
* itemOperations={
|
||||
* "get"={
|
||||
* "method"="GET",
|
||||
* "controller"=NotFoundAction::class,
|
||||
* "read"=false,
|
||||
* "output"=false,
|
||||
* },
|
||||
* },
|
||||
* collectionOperations={"get"}
|
||||
* )
|
||||
*
|
||||
*/
|
||||
class PriceNow
|
||||
{
|
||||
/**
|
||||
* @ApiProperty(identifier=true)
|
||||
*/
|
||||
public ?int $id = null;
|
||||
|
||||
public ?int $min = null;
|
||||
public ?int $max = null;
|
||||
public ?int $avg = null;
|
||||
public ?int $now = null;
|
||||
}
|
Reference in New Issue
Block a user