'array', 'action_at' => 'datetime', 'completed_at' => 'datetime', 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; protected $attributes = [ 'platform' => 'web', 'export_quality' => 'standard', 'export_status' => 'initiated', ]; /** * Get the associated meme */ public function meme(): BelongsTo { return $this->belongsTo(Meme::class); } /** * Get the associated meme media */ public function memeMedia(): BelongsTo { return $this->belongsTo(MemeMedia::class, 'meme_media_id'); } /** * Get the associated background media */ public function backgroundMedia(): BelongsTo { return $this->belongsTo(BackgroundMedia::class, 'background_media_id'); } /** * Scope for completed exports */ public function scopeCompleted($query) { return $query->where('export_status', 'completed'); } /** * Scope for failed exports */ public function scopeFailed($query) { return $query->where('export_status', 'failed'); } /** * Scope for processing exports */ public function scopeProcessing($query) { return $query->where('export_status', 'processing'); } }