Fills the gaps between the admin panel screens and the backend: a full free-text + slide-count + language -> AI-generated presentation flow with new slide-cloning logic in TemplateFillService, a "my presentations" list endpoint, a swappable payment-gateway structure for wallet top-ups (fake driver for now), and avatar upload / public-profile toggle / account deletion / password change / notification preference endpoints. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\NotificationPreference;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
use OpenApi\Attributes as OA;
|
|
|
|
#[OA\Schema(
|
|
schema: 'NotificationPreference',
|
|
properties: [
|
|
new OA\Property(property: 'comment_on_presentation', type: 'boolean', example: true),
|
|
new OA\Property(property: 'form_reply', type: 'boolean', example: false),
|
|
new OA\Property(property: 'new_follower', type: 'boolean', example: false),
|
|
new OA\Property(property: 'news_announcements', type: 'boolean', example: false),
|
|
new OA\Property(property: 'weekly_product_updates', type: 'boolean', example: true),
|
|
new OA\Property(property: 'weekly_blog_digest', type: 'boolean', example: false),
|
|
]
|
|
)]
|
|
/** @mixin NotificationPreference */
|
|
class NotificationPreferenceResource extends JsonResource
|
|
{
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'comment_on_presentation' => $this->comment_on_presentation,
|
|
'form_reply' => $this->form_reply,
|
|
'new_follower' => $this->new_follower,
|
|
'news_announcements' => $this->news_announcements,
|
|
'weekly_product_updates' => $this->weekly_product_updates,
|
|
'weekly_blog_digest' => $this->weekly_blog_digest,
|
|
];
|
|
}
|
|
}
|