'boolean', 'is_hidden' => 'boolean', 'is_user_edited' => 'boolean', 'needs_review' => 'boolean', 'generated_at' => 'datetime', 'approved_at' => 'datetime', 'last_attempted_at' => 'datetime', ]; public function user(): BelongsTo { return $this->belongsTo(User::class); } public function isVisible(): bool { return $this->is_active && ! $this->is_hidden && in_array($this->status, [self::STATUS_GENERATED, self::STATUS_APPROVED, self::STATUS_EDITED, self::STATUS_NEEDS_REVIEW], true) && $this->text !== null && trim($this->text) !== ''; } }