<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Inquiry extends Model
{
    protected $table = 'inquiries';

    protected $fillable = [
        'first_name',
        'last_name',
        'email',
        'company',
        'service_id',
        'message',
        'ip',
        'browser',
        'location_info',
    ];

    protected $casts = [
        'location_info' => 'array',
    ];

    public function service(): BelongsTo
    {
        return $this->belongsTo(Service::class);
    }
}
