mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
45 lines
901 B
PHP
45 lines
901 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\KeyValuePairs\DataTransferObjects;
|
|
|
|
|
|
use App\Classes\General\Interfaces\DataTransferObject;
|
|
|
|
class UpdateClaudePromptDTO implements DataTransferObject
|
|
{
|
|
public int $id;
|
|
public string $title;
|
|
public string $prompt;
|
|
|
|
public function __construct(array $data)
|
|
{
|
|
$this->id = (int) ($data['id'] ?? 0);
|
|
$this->title = (string) ($data['key'] ?? '');
|
|
$this->prompt = (string) ($data['value'] ?? '');
|
|
}
|
|
|
|
public function toArray(): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'title' => $this->title,
|
|
'prompt' => $this->prompt,
|
|
];
|
|
}
|
|
|
|
public function getId(): int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getTitle(): string
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
public function getPrompt(): string
|
|
{
|
|
return $this->prompt;
|
|
}
|
|
}
|