<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class VAPayment extends Model
{
    use HasFactory;

    protected $table = 'va_payments';

    protected $fillable = [
        'user_id',
        'item_type',
        'items',
        'tax',
        'total_amount',
        'coupon',
        'va_number',
        'status',
        'expired_at',
        'paid_at',
    ];

    protected $casts = [
        'expired_at' => 'datetime',
        'paid_at'    => 'datetime',
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

}
