Restore photobooth uploader files after sync
This commit is contained in:
29
database/factories/PhotoboothConnectCodeFactory.php
Normal file
29
database/factories/PhotoboothConnectCodeFactory.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Event;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\PhotoboothConnectCode>
|
||||
*/
|
||||
class PhotoboothConnectCodeFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$rawCode = str_pad((string) $this->faker->numberBetween(0, 999999), 6, '0', STR_PAD_LEFT);
|
||||
|
||||
return [
|
||||
'event_id' => Event::factory(),
|
||||
'code_hash' => hash('sha256', $rawCode),
|
||||
'expires_at' => now()->addMinutes(10),
|
||||
'redeemed_at' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user