37 lines
742 B
PHP
37 lines
742 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\ResponseStatus;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ApiRequest extends Model
|
|
{
|
|
public const UPDATED_AT = null;
|
|
|
|
protected $fillable = [
|
|
'website_id',
|
|
'registration_number',
|
|
'ip_address',
|
|
'contact_data',
|
|
'response_status',
|
|
'metadata',
|
|
'created_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'contact_data' => 'array',
|
|
'metadata' => 'array',
|
|
'response_status' => ResponseStatus::class,
|
|
];
|
|
}
|
|
|
|
public function website(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Website::class);
|
|
}
|
|
}
|