<?php

declare(strict_types=1);

namespace ImovelZapAi\SuperAdmin\Infrastructure\Persistence\Eloquent;

use Illuminate\Database\Eloquent\Model;
use ImovelZapAi\Shared\Infrastructure\Persistence\Concerns\HasUuidPrimaryKey;

class PlatformConnectorModel extends Model
{
    use HasUuidPrimaryKey;

    protected $table = 'platform_connectors';

    /** @var list<string> */
    protected $fillable = [
        'code',
        'name',
        'category',
        'status',
        'meta',
        'last_checked_at',
    ];

    /** @return array<string, string> */
    protected function casts(): array
    {
        return [
            'meta' => 'array',
            'last_checked_at' => 'datetime',
        ];
    }
}
