fix: standardize language to English in README and AlertSettings

feat: add 24 model factories for Help, Shop, Community, Game, User domains

- Translate mixed Dutch/English strings in README.md and AlertSettings.php
- Add HasFactory trait to 23 models
- Create factories for Help (6), Shop (4), Community (5), Game (2), User (7)
This commit is contained in:
root
2026-05-23 16:57:44 +02:00
parent 33c03e8b7b
commit 574b5d6e17
49 changed files with 647 additions and 27 deletions
@@ -0,0 +1,20 @@
<?php
namespace Database\Factories\Community\RareValue;
use App\Models\Community\RareValue\WebsiteRareValueCategory;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsiteRareValueCategoryFactory extends Factory
{
protected $model = WebsiteRareValueCategory::class;
public function definition(): array
{
return [
'name' => $this->faker->unique()->word(),
'badge' => $this->faker->word(),
'priority' => $this->faker->numberBetween(1, 10),
];
}
}
@@ -0,0 +1,24 @@
<?php
namespace Database\Factories\Community\RareValue;
use App\Models\Community\RareValue\WebsiteRareValue;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsiteRareValueFactory extends Factory
{
protected $model = WebsiteRareValue::class;
public function definition(): array
{
return [
'category_id' => WebsiteRareValueCategoryFactory::new(),
'item_id' => $this->faker->numberBetween(1, 10000),
'name' => $this->faker->unique()->word(),
'credit_value' => (string) $this->faker->numberBetween(1, 1000),
'currency_value' => (string) $this->faker->numberBetween(1, 100),
'currency_type' => 'diamonds',
'furniture_icon' => $this->faker->word() . '.png',
];
}
}
@@ -0,0 +1,23 @@
<?php
namespace Database\Factories\Community\Staff;
use App\Models\Community\Staff\WebsiteOpenPosition;
use App\Models\Community\Teams\WebsiteTeam;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsiteOpenPositionFactory extends Factory
{
protected $model = WebsiteOpenPosition::class;
public function definition(): array
{
return [
'team_id' => WebsiteTeam::factory(),
'position_kind' => $this->faker->randomElement(['rank', 'role']),
'permission_id' => 1,
'apply_from' => now()->subDay(),
'apply_to' => now()->addMonth(),
];
}
}
@@ -0,0 +1,39 @@
<?php
namespace Database\Factories\Community\Staff;
use App\Models\Community\Staff\WebsiteStaffApplications;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsiteStaffApplicationsFactory extends Factory
{
protected $model = WebsiteStaffApplications::class;
public function definition(): array
{
return [
'user_id' => User::factory(),
'rank_id' => 1,
'content' => $this->faker->paragraphs(3, true),
];
}
public function approved(): static
{
return $this->state(fn (array $attributes) => [
'status' => 'approved',
'approved_by' => User::factory(),
'approved_at' => now(),
]);
}
public function rejected(): static
{
return $this->state(fn (array $attributes) => [
'status' => 'rejected',
'rejected_by' => User::factory(),
'rejected_at' => now(),
]);
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Database\Factories\Community\Teams;
use App\Models\Community\Teams\WebsiteTeam;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsiteTeamFactory extends Factory
{
protected $model = WebsiteTeam::class;
public function definition(): array
{
return [
'rank_name' => $this->faker->unique()->jobTitle(),
'hidden_rank' => false,
'badge' => $this->faker->word(),
'job_description' => $this->faker->sentence(),
'staff_color' => '#327fa8',
'staff_background' => 'staff-bg.png',
];
}
}