<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ContinueWatching extends Model
{
    public $timestamps = false;

    protected $table = 'continue_watching';

    protected $fillable = [
        'user_id', 'anime_id', 'episode_id',
        'season_number', 'episode_number',
        'seconds_watched', 'total_seconds', 'percent_complete',
        'updated_at',
    ];

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

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