<?php

declare(strict_types=1);

namespace PHPMax\Api\Messages;

use PHPMax\Support\Model;

class SendMessagePayloadMessage extends Model
{
     
    public $text;
     
    public $cid;
     
    public $elements = [];
     
    public $attaches = [];
     
    public $link;

    protected static function schema(): array
    {
        return [
            'text' => ['type' => 'string', 'required' => true],
            'cid' => ['type' => 'int', 'required' => true],
            'elements' => ['type' => 'list<mixed>', 'default' => static function (): array {
                return [];
            }],
            'attaches' => ['type' => 'list<mixed>', 'default' => static function (): array {
                return [];
            }],
            'link' => ['type' => ReplyLink::class],
        ];
    }
}
