<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Website extends Model
{
    protected $fillable = [
        'user_id',
        'url',
        'status',
        'screenshot_path',
        'last_scanned_at',
        'error_message',
    ];

    protected $casts = [
        'last_scanned_at' => 'datetime',
    ];

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