<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class RenewRequest extends Model
{
    /**
     * @var string
     */
    protected $table = 'renew_requests';

    /**
     * @var string[]
     */
    protected $fillable = [
     	'successful',
     	'renew_data',
     	'invoice_id',
        'judopay_id',
        'judopay_md',
        'error',
        'error_text',
        'domain_id',
        'invoice_main_id',
        'registry_error_text',
    ];

    /**
     * @var string[]
     */
    protected $casts = [
        'renew_data' => 'array',
    ];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function domain()
    {
        return $this->belongsTo(Domain::class);
    }

}
