feat: add plugin model

initial implementation of playlist

feat: added support for playlists
This commit is contained in:
Benjamin Nussbaum 2025-03-11 22:34:28 +01:00
parent 276511fc98
commit 4195269414
17 changed files with 669 additions and 15 deletions

29
app/Models/Plugin.php Normal file
View file

@ -0,0 +1,29 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Plugin extends Model
{
use HasFactory;
protected $guarded = ['id'];
protected $casts = [
'data_payload' => 'json',
];
protected static function boot()
{
parent::boot();
static::creating(function ($model) {
if (empty($model->uuid)) {
$model->uuid = Str::uuid();
}
});
}
}