Initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Aggregator\Application\UseCase\Command;
|
||||
|
||||
use App\Aggregator\Domain\Model\ValueObject\Link;
|
||||
use App\Aggregator\Domain\Service\Crawling\OpenGraph\OpenGraphObject;
|
||||
|
||||
/**
|
||||
* Class Save.
|
||||
*
|
||||
* @author bernard-ng <bernard@devscast.tech>
|
||||
*/
|
||||
final readonly class CreateArticle
|
||||
{
|
||||
public function __construct(
|
||||
public string $title,
|
||||
public Link $link,
|
||||
public string $categories,
|
||||
public string $body,
|
||||
public string $source,
|
||||
public int $timestamp,
|
||||
public ?OpenGraphObject $metadata = null
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Aggregator\Application\UseCase\Command;
|
||||
|
||||
use App\Aggregator\Domain\Model\ValueObject\Scoring\Credibility;
|
||||
|
||||
/**
|
||||
* Class CreateSource.
|
||||
*
|
||||
* @author bernard-ng <bernard@devscast.tech>
|
||||
*/
|
||||
final readonly class CreateSource
|
||||
{
|
||||
public function __construct(
|
||||
public string $name,
|
||||
public Credibility $credibility,
|
||||
public ?string $displayName = null,
|
||||
public ?string $description = null
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Aggregator\Application\UseCase\Command;
|
||||
|
||||
/**
|
||||
* Class DeleteArticles.
|
||||
*
|
||||
* @author bernard-ng <bernard@devscast.tech>
|
||||
*/
|
||||
final readonly class DeleteArticles
|
||||
{
|
||||
public function __construct(
|
||||
public string $source,
|
||||
public ?string $category = null
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Aggregator\Application\UseCase\Command;
|
||||
|
||||
use App\SharedKernel\Domain\Model\ValueObject\DateRange;
|
||||
|
||||
/**
|
||||
* Class Export.
|
||||
*
|
||||
* @author bernard-ng <bernard@devscast.tech>
|
||||
*/
|
||||
final readonly class ExportArticles
|
||||
{
|
||||
public function __construct(
|
||||
public ?string $source = null,
|
||||
public ?DateRange $date = null
|
||||
) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user