<?php

namespace App\Models;

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

class SpeciesSurvey extends Model
{
    protected $table = 'species_surveys';

    protected $fillable = [
        'user_id',
        'species_id',
        'species_name',
        'state_id',
        'state_name',
        'landing_center_id',
        'landing_center_name',
        'user_name',
        'image',
        'image_url',
        'gear_name',
    ];

    /**
     * Get the mobile user who uploaded this survey.
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}
