File: /var/www/middleware-citas/app/Models/Payment.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Payment extends Model
{
use HasFactory;
protected $fillable = [
'appointment_id',
'toku_transaction_id',
'toku_event_id',
'event_type',
'status',
'amount',
'currency',
'transaction_date',
'response_code',
'response_message',
'card_brand',
'card_type',
'card_last_digits',
'card_holder',
'card_installments',
'raw_payload',
];
protected $casts = [
'raw_payload' => 'array',
'transaction_date' => 'datetime',
];
public function appointment()
{
return $this->belongsTo(Appointment::class);
}
}