feat(api): add AI text-to-deck generation, wallet deposit structure, and profile/notification endpoints

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>
This commit is contained in:
2026-08-29 01:36:17 +03:30
parent fe2090a5af
commit 46ae711a20
42 changed files with 1632 additions and 44 deletions

View File

@@ -17,7 +17,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
#[Fillable(['name', 'username', 'email', 'mobile', 'password'])]
#[Fillable(['name', 'username', 'email', 'mobile', 'password', 'avatar_path', 'is_public'])]
#[Hidden(['password', 'remember_token'])]
class User extends Authenticatable implements FilamentUser
{
@@ -56,6 +56,22 @@ class User extends Authenticatable implements FilamentUser
return $this->hasMany(Notification::class)->latest();
}
/**
* @return HasOne<NotificationPreference, $this>
*/
public function notificationPreference(): HasOne
{
return $this->hasOne(NotificationPreference::class);
}
/**
* @return HasMany<TemplateGeneration, $this>
*/
public function templateGenerations(): HasMany
{
return $this->hasMany(TemplateGeneration::class, 'requested_by')->latest();
}
public function hasRole(string|array $roles): bool
{
$roles = (array) $roles;
@@ -87,6 +103,7 @@ class User extends Authenticatable implements FilamentUser
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
'is_public' => 'boolean',
];
}
}