<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class GtsProvider extends Model
{
    protected $fillable = ['name', 'api_url', 'api_key', 'status', 'balance', 'last_synced_at'];

    protected $hidden = ['api_key'];

    protected function casts(): array
    {
        return ['last_synced_at' => 'datetime'];
    }

    public function services()
    {
        return $this->hasMany(GtsService::class);
    }
}
