<?php

namespace App\Classes\Modules\KeyValuePairs\DataTransferObjects;


use App\Classes\General\Interfaces\DataTransferObject;

class CreateChatGPTPromptDTO implements DataTransferObject
{
    public string $title;
    public string $prompt;

    public function __construct(array $data)
    {
        $this->title = (string) ($data['key'] ?? '');
        $this->prompt = (string) ($data['value'] ?? '');
    }

    public function toArray(): array
    {
        return [
            'title' => $this->title,
            'prompt' => $this->prompt,
        ];
    }

    public function getTitle(): string
    {
        return $this->title;
    }

    public function getPrompt(): string
    {
        return $this->prompt;
    }
}
