46 lines
		
	
	
		
			855 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			855 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Models;
 | 
						|
 | 
						|
use Illuminate\Database\Eloquent\Factories\HasFactory;
 | 
						|
use Illuminate\Database\Eloquent\Model;
 | 
						|
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
						|
 | 
						|
class Artwork extends Model
 | 
						|
{
 | 
						|
    use HasFactory;
 | 
						|
 | 
						|
    use SoftDeletes;
 | 
						|
 | 
						|
    protected $table = 'artworks';
 | 
						|
 | 
						|
    protected $dates = ['created_at', 'updated_at', 'deleted_at'];
 | 
						|
 | 
						|
    protected $casts = [
 | 
						|
        'created_at' => 'datetime',
 | 
						|
        'updated_at' => 'datetime',
 | 
						|
        'deleted_at' => 'datetime',
 | 
						|
    ];
 | 
						|
 | 
						|
    public function podcast()
 | 
						|
    {
 | 
						|
        return $this->belongsTo(Podcast::class);
 | 
						|
    }
 | 
						|
 | 
						|
    public function artist()
 | 
						|
    {
 | 
						|
        return $this->belongsTo(Artist::class);
 | 
						|
    }
 | 
						|
 | 
						|
    public function episode()
 | 
						|
    {
 | 
						|
        return $this->belongsTo(Episode::class);
 | 
						|
    }
 | 
						|
 | 
						|
    public function overlay()
 | 
						|
    {
 | 
						|
        return $this->hasOne(Overlay::class);
 | 
						|
    }
 | 
						|
 | 
						|
}
 |