feat: add ratings

This commit is contained in:
2026-02-25 19:37:53 +03:30
parent 4d0823ef86
commit 676522d70d
7 changed files with 270 additions and 5 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Rating extends Model
{
protected $fillable = [
'user_id',
'media_id',
'stars',
];
public function media()
{
return $this->belongsTo(Media::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
}