move into sonardesk
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Media\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
final class Media extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'media';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
self::creating(fn (self $m) => $m->uuid ??= (string) Str::uuid());
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['metadata' => 'array', 'size' => 'integer', 'sort_order' => 'integer'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user