mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-04 04:34:54 +00:00
🎨 **Style:** Fixed indentation inconsistencies in meetup_user migration file.
🛠️ **Factory:** Created factories for `TwitterAccount`, `EmailCampaign`, `EmailTexts`, and `BookCase`. ✨ **Helper:** Added `NostrHelper` with methods for generating fake/mocked Nostr data. ⬆️ **Dependencies:** Updated multiple Composer dependencies including `laravel/framework`, `astrotomic/laravel-translatable`, and others to their latest versions.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Course;
|
||||
use App\Models\CourseEvent;
|
||||
use App\Models\User;
|
||||
use App\Models\Venue;
|
||||
use Database\Factories\Helpers\NostrHelper;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<CourseEvent>
|
||||
*/
|
||||
class CourseEventFactory extends Factory
|
||||
{
|
||||
protected $model = CourseEvent::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
$from = fake()->dateTimeBetween('+1 day', '+3 months');
|
||||
$to = (clone $from)->modify('+2 hours');
|
||||
|
||||
return [
|
||||
'course_id' => Course::factory(),
|
||||
'venue_id' => Venue::factory(),
|
||||
'from' => $from,
|
||||
'to' => $to,
|
||||
'link' => 'https://einundzwanzig.space/courses/'.fake()->slug(),
|
||||
'nostr_status' => NostrHelper::fakeNostrEventStatus(),
|
||||
'created_by' => User::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user