initial commit
This commit is contained in:
15
app/Data/Intent/Contact/CreateContactIntent.php
Normal file
15
app/Data/Intent/Contact/CreateContactIntent.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\Contact;
|
||||
|
||||
final class CreateContactIntent
|
||||
{
|
||||
public function __construct(
|
||||
public string $email,
|
||||
public ?string $firstName,
|
||||
public ?string $lastName,
|
||||
) {
|
||||
}
|
||||
}
|
||||
15
app/Data/Intent/Contact/DeleteContactIntent.php
Normal file
15
app/Data/Intent/Contact/DeleteContactIntent.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\Contact;
|
||||
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
|
||||
final class DeleteContactIntent
|
||||
{
|
||||
public function __construct(
|
||||
public UuidInterface $uuid,
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\Contact\ProcessImport;
|
||||
|
||||
final class ImportContactIntent
|
||||
{
|
||||
public function __construct(
|
||||
public ?string $email = null,
|
||||
public ?string $firstName = null,
|
||||
public ?string $lastName = null,
|
||||
) {
|
||||
}
|
||||
}
|
||||
27
app/Data/Intent/Contact/SearchContactIntent.php
Normal file
27
app/Data/Intent/Contact/SearchContactIntent.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\Contact;
|
||||
|
||||
final class SearchContactIntent
|
||||
{
|
||||
private const QUERY_ALL = '*';
|
||||
|
||||
public readonly string $query;
|
||||
public readonly int $resultsPerPage;
|
||||
|
||||
public function __construct(
|
||||
string $query,
|
||||
) {
|
||||
$this->query = strtolower($query);
|
||||
$this->resultsPerPage = 20;
|
||||
}
|
||||
|
||||
public static function queryAll(): SearchContactIntent
|
||||
{
|
||||
return new SearchContactIntent(
|
||||
self::QUERY_ALL
|
||||
);
|
||||
}
|
||||
}
|
||||
15
app/Data/Intent/Contact/SearchContactIntentByUuid.php
Normal file
15
app/Data/Intent/Contact/SearchContactIntentByUuid.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\Contact;
|
||||
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
|
||||
class SearchContactIntentByUuid
|
||||
{
|
||||
public function __construct(
|
||||
public readonly UuidInterface $uuid,
|
||||
) {
|
||||
}
|
||||
}
|
||||
18
app/Data/Intent/Contact/UpdateContactIntent.php
Normal file
18
app/Data/Intent/Contact/UpdateContactIntent.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\Contact;
|
||||
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
|
||||
final class UpdateContactIntent
|
||||
{
|
||||
public function __construct(
|
||||
public UuidInterface $uuid,
|
||||
public string $email,
|
||||
public ?string $firstName,
|
||||
public ?string $lastName,
|
||||
) {
|
||||
}
|
||||
}
|
||||
13
app/Data/Intent/ProcessImport/ImportContactsIntent.php
Normal file
13
app/Data/Intent/ProcessImport/ImportContactsIntent.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\ProcessImport;
|
||||
|
||||
class ImportContactsIntent
|
||||
{
|
||||
public function __construct(
|
||||
public readonly string $path
|
||||
) {
|
||||
}
|
||||
}
|
||||
15
app/Data/Intent/ProcessImport/SearchImportContactsIntent.php
Normal file
15
app/Data/Intent/ProcessImport/SearchImportContactsIntent.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Data\Intent\ProcessImport;
|
||||
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
|
||||
class SearchImportContactsIntent
|
||||
{
|
||||
public function __construct(
|
||||
public readonly UuidInterface $uuid,
|
||||
) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user