<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class CrawlLog extends Model
{
    public $timestamps  = false;
    protected $fillable = [
        'source_id', 'status', 'articles_found', 'articles_saved',
        'articles_skipped', 'error_message', 'started_at', 'finished_at', 'duration_seconds',
    ];
    protected $casts = ['started_at' => 'datetime', 'finished_at' => 'datetime'];

    public function source() { return $this->belongsTo(Source::class); }
}
