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

class VideoProgress extends Model {
    protected $fillable = ['user_id','video_id','seconds_watched','completed_at'];
    protected $casts = ['completed_at'=>'datetime'];
    public function user(){ return $this->belongsTo(\App\Models\User::class); }
    public function video(){ return $this->belongsTo(SessionVideo::class,'video_id'); }
}