sintonia_webapp/app/Models/PlaylistContent.php
2025-07-02 13:14:27 +02:00

46 lines
979 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use PhpParser\Node\Stmt\Block;
class PlaylistContent extends Model
{
use HasFactory;
protected $table = 'cc_playlistcontents';
public $timestamps = false;
protected $fillable = [
'playlist_id',
'file_id',
'block_id',
'stream_id',
'type', //0 = file, 1 = stream, 2 = block
'position',
'trackoffset',
'cliplength',
'cuein',
'cueout',
'fadein',
'fadeout'
];
public function playlist() {
return $this->belongsTo(Playlist::class);
}
public function file() {
return $this->belongsTo(File::class);
}
public function block() {
return $this->belongsTo(SmartBlock::class, 'block_id');
}
public function webstream() {
return $this->belongsTo(Webstream::class, 'stream_id');
}
}