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,24 @@
<?php
namespace Database\Factories\Shop;
use App\Models\Shop\WebsitePaypalTransaction;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsitePaypalTransactionFactory extends Factory
{
protected $model = WebsitePaypalTransaction::class;
public function definition(): array
{
return [
'user_id' => User::factory(),
'transaction_id' => $this->faker->uuid(),
'status' => $this->faker->randomElement(['completed', 'pending', 'failed']),
'description' => $this->faker->sentence(),
'amount' => $this->faker->randomFloat(2, 1, 100),
'currency' => 'USD',
];
}
}
@@ -0,0 +1,22 @@
<?php
namespace Database\Factories\Shop;
use App\Models\Shop\WebsiteShopArticle;
use App\Models\Shop\WebsiteShopArticleFeature;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsiteShopArticleFeatureFactory extends Factory
{
protected $model = WebsiteShopArticleFeature::class;
public function definition(): array
{
return [
'article_id' => WebsiteShopArticle::factory(),
'features' => json_encode([
$this->faker->word() => $this->faker->word(),
]),
];
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace Database\Factories\Shop;
use App\Models\Shop\WebsiteShopVoucher;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsiteShopVoucherFactory extends Factory
{
protected $model = WebsiteShopVoucher::class;
public function definition(): array
{
return [
'code' => strtoupper($this->faker->bothify('VOUCHER-????-####')),
'max_uses' => $this->faker->numberBetween(1, 100),
'use_count' => 0,
'amount' => $this->faker->numberBetween(100, 5000),
'expires_at' => $this->faker->dateTimeBetween('+1 month', '+1 year'),
];
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace Database\Factories\Shop;
use App\Models\Shop\WebsiteUsedShopVoucher;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebsiteUsedShopVoucherFactory extends Factory
{
protected $model = WebsiteUsedShopVoucher::class;
public function definition(): array
{
return [
'user_id' => User::factory(),
'voucher_id' => WebsiteShopVoucherFactory::new(),
];
}
}