feat: button to add movie monitor
This commit is contained in:
31
src/Download/Action/Input/AddMovieMonitorInput.php
Normal file
31
src/Download/Action/Input/AddMovieMonitorInput.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Download\Action\Input;
|
||||
|
||||
use App\Download\Action\Command\AddMovieMonitorCommand;
|
||||
use OneToMany\RichBundle\Attribute\SourceRoute;
|
||||
use OneToMany\RichBundle\Attribute\SourceSecurity;
|
||||
use OneToMany\RichBundle\Contract\CommandInterface;
|
||||
use OneToMany\RichBundle\Contract\InputInterface;
|
||||
|
||||
class AddMovieMonitorInput implements InputInterface
|
||||
{
|
||||
public function __construct(
|
||||
#[SourceSecurity]
|
||||
public string $userEmail,
|
||||
|
||||
#[SourceRoute('title')]
|
||||
public string $title,
|
||||
|
||||
#[SourceRoute('tmdbId')]
|
||||
public string $tmdbId,
|
||||
|
||||
#[SourceRoute('imdbId')]
|
||||
public string $imdbId,
|
||||
) {}
|
||||
|
||||
public function toCommand(): CommandInterface
|
||||
{
|
||||
return new AddMovieMonitorCommand($this->userEmail, $this->title, $this->tmdbId, $this->imdbId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user