Source path: app/Models/Post.php
Extracted from supplied specification. Review before copying into application.

<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    protected $guarded = [];
    protected $casts = ['scheduled_at' => 'datetime', 'published_at' => 'datetime'];

    public function user()    { return $this->belongsTo(User::class); }
    public function targets() { return $this->hasMany(PostTarget::class); }
    public function media()   { return $this->hasMany(Media::class); }

    public function mediaReady(): bool
    {
        return !$this->media()->whereIn('status', ['pending', 'processing', 'failed'])->exists();
    }
}
