updated table structure for photobooth/sparkbooth settings. now there's a separate table for it. update all references and tests. also fixed the notification panel and the lightbox in the guest app.
This commit is contained in:
47
database/factories/EventPhotoboothSettingFactory.php
Normal file
47
database/factories/EventPhotoboothSettingFactory.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Event;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\EventPhotoboothSetting>
|
||||
*/
|
||||
class EventPhotoboothSettingFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'event_id' => Event::factory(),
|
||||
'enabled' => false,
|
||||
'mode' => 'ftp',
|
||||
'status' => 'inactive',
|
||||
'uploads_last_24h' => 0,
|
||||
'uploads_total' => 0,
|
||||
];
|
||||
}
|
||||
|
||||
public function activeFtp(): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'enabled' => true,
|
||||
'mode' => 'ftp',
|
||||
'status' => 'active',
|
||||
]);
|
||||
}
|
||||
|
||||
public function activeSparkbooth(): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'enabled' => true,
|
||||
'mode' => 'sparkbooth',
|
||||
'status' => 'active',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user